Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update file management ui tests #1113

Merged
merged 19 commits into from
Jun 10, 2021
Merged

Conversation

asnaith
Copy link
Member

@asnaith asnaith commented Jun 10, 2021

Relates to #1085

What I changed

  • Updated the file management tests to use page object pattern

Notes

  • I found a way to repeat tests easily (by putting the it block inside this Cypress._.times(100, (k) => { }). By doing this I was able to reproduce some of the frailty we have seen in CI. As a result I've also increased the default page instances as I reproduced 4 instances out of 100 where the page load did not complete within the previous timeout (6 seconds).

  • Let me know if you like the added comments that add a bit more context to the tests. I think it helps but can remove if people don't think it's necessary.

@asnaith asnaith added the Status: Review Needed 👀 Added to PRs when they need more review label Jun 10, 2021
@render
Copy link

render bot commented Jun 10, 2021

@github-actions github-actions bot added the Type: Maintenance Added to issues and PRs when a change is for repository maintenance , such as CI or linter changes. label Jun 10, 2021
Copy link
Collaborator

@Tbaut Tbaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question from my side. The rest looks awesome.

Let me know if you like the added comments that add a bit more context to the tests. I think it helps but can remove if people don't think it's necessary.

Love it

packages/files-ui/cypress/support/page-objects/homePage.ts Outdated Show resolved Hide resolved
@@ -1,4 +1,5 @@
{
"integrationFolder": "cypress/tests",
"pageLoadTimeout": 10000,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm are you sure, this is effectively reducing the page timeout afaiu, the default is 60s, (60000) according to https://docs.cypress.io/guides/references/configuration#Timeouts

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Tbaut Oh good catch, thank you. I'd misread.

After making the change I ran the test 100 times and didn't see a page load error so I thought that had solved the issue but I'd actually lowered it and got lucky.

I've reverted this change now. I think it's fine to keep the timeout as the default, if it's longer than 60 seconds it is probably a genuine problem and not a test related issue.

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
@render
Copy link

render bot commented Jun 10, 2021

Copy link
Collaborator

@Tbaut Tbaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

niiice thank you so much, this is much cleaner!

@Tbaut Tbaut added Status: Approved ✅ and removed Status: Review Needed 👀 Added to PRs when they need more review labels Jun 10, 2021
@Tbaut Tbaut merged commit 0bef998 into dev Jun 10, 2021
@Tbaut Tbaut deleted the mnt/filemanagement-test-update-1085 branch June 10, 2021 16:04
@FSM1 FSM1 mentioned this pull request Jun 15, 2021
FSM1 added a commit that referenced this pull request Jun 15, 2021
* Updated-labels

* Removed Reference dev

* Update readme.md (#1083)

* Update readme.md

* Update readme.md

* Drop the last sentence from readme.md

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Survey v2 for product market fit (#1082)

* v2

* translatioin FR

* more

* lingui extract

* with gradient

* Update packages/files-ui/src/Components/SurveyBanner.tsx

Co-authored-by: Cindy Chau <47398578+sweetpea22@users.noreply.github.com>

* lingui extract

* Update packages/files-ui/src/locales/fr/messages.po

* different gradient for better readability

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Cindy Chau <47398578+sweetpea22@users.noreply.github.com>

* Storage app skeleton  (#1067)

* remove old chainsafe x package

* initial app skeleton and refactor

* fix api client issues

* remove old chainsafe x package

* initial app skeleton and refactor

* fix api client issues

* remove tests

* Apply suggestions from code review

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Update packages/storage-ui/src/Contexts/StorageApiContext.tsx

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* make eslint :D again

* remove unneeded login methods

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Update release-drafter with the new name (#1088)

* Update release-drafter.yml

* Update .github/release-drafter.yml

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Add page object pattern for ui tests (#1080)

* Add PR labeler based on the branch name (#1089)

* pr labeler

* with workflow

* for PR

* back to open

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* passwordless login (#1072)

* UI ready

* UI ready and trans ready

* work in progress

* lingui extract

* passwordless login

* code and login

* loaders on passwordless login

* wallet names

* lingui extract

* Delete package.json

* feedback

* lingui extract

* Cleanup InitialScreen (#1092)

* cleanup

* spaces

* compile update

* fr translation and ternarry nits

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>

* Fix Bin Preview (#1093)

* update to new api client and wire up download

* cypress bump to avoid having 2 packages

Co-authored-by: Thibaut Sardan <github@thib.top>

* Update pr-labeler.yml (#1099)

* Update pr-labeler.yml

* Update pr-labeler.yml

* Update pr-labeler.yml

* Update pr-labeler.yml

* Update pr-labeler.yml

* Apply suggestions from code review

* Update .github/workflows/pr-labeler.yml

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* removed redundant stage & prod release which is replaced by release drafter; updated readme (#1102)

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Fix InitialScreen.tsx Error messages (#1100)

* Update InitialScreen.tsx

* Update packages/files-ui/src/Components/Modules/LoginModule/InitialScreen.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Deprecate all `files/` endpoints (#1095)

* deprecate all `files/` endpoints

* clean up remaining todos

* Update packages/files-ui/src/Components/Modules/FileBrowsers/BinFileBrowser.tsx

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* fix lint

* update to latest api client

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Files API Client in Tests (#1097)

* use api client in tests

* fix detached from the Dom (#1096)

Co-authored-by: Thibaut Sardan <github@thib.top>

* make eslint :D

* update yarn lock

* update commands

Co-authored-by: Thibaut Sardan <github@thib.top>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Recover files with move file modal  (#1094)

* recover files in modal

* move file restructure

* lingui extract

* deprecate all `files/` endpoints

* clean up remaining todos

* Update packages/files-ui/src/Components/Modules/FileBrowsers/BinFileBrowser.tsx

Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* fix lint

* move file update

* lint and installs

* Update packages/files-ui/src/Components/Modules/FileBrowsers/MoveFileModal.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/MoveFileModal.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/locales/fr/messages.po

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/FileBrowsers/MoveFileModal.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/locales/fr/messages.po

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update file management ui tests (#1113)

* Fix mistake

* Update homepage page object and file management tests

* Fix typo in test identifier

* update homePage object

* use api client in tests

* fix detached from the Dom (#1096)

Co-authored-by: Thibaut Sardan <github@thib.top>

* wip

* Increase cypress page load timeout

* Rename element and update page object

* Update file management ui tests

* Remove white space

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Revert to default page load timeout

Co-authored-by: Michael Yankelev <myankelev@gmail.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Wording for backup **secret** phrase (#1116)

* wording for secret phrase

* lingui extract

* Update packages/files-ui/src/locales/fr/messages.po

Co-authored-by: GitHub Actions <actions@github.com>

* CIDs overview (#1117)

* wip

* v1.14

* v1.15-rc1

* show Cids

* buckets in nav bar

* cleanup

* cid instead of pin

* in menus

* login on refresh - storage ui (#1109)

* with local storage

* local or session

* v2 api spec

* v2.1

Co-authored-by: Thibaut Sardan <github@thib.top>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>

* Put eslint at top level since it's shared by all packages (#1115)

* eslint at top level

* fix lint

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Allow to unpin a Cid (#1110)

* wip

* v1.14

* v1.15-rc1

* show Cids

* buckets in nav bar

* cleanup

* cid instead of pin

* in menus

* unpin and styling

* lint

* eslint 6.8 to make react-script happy (#1121)

* Add identifier for the upload status box (#1122)

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* tkey address in settings (#1112)

* key address added

* lingui extract

* Update packages/files-ui/src/Components/Modules/Settings/Profile.tsx

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/Settings/Profile.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* Update packages/files-ui/src/Components/Modules/Settings/Profile.tsx

Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>

* lingui extract

* renames

Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Michael Yankelev <12774278+FSM1@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Force refresh on buckets when deleting from bin (#1127)

* Force refresh

* Liniting

* Linting

* Added to upload

* Copied across styling (#1125)

Co-authored-by: Thibaut Sardan <github@thib.top>

* Dnd Fix destination path (#1118)

* fix destination path

* Implement suggestion

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>

* Handle walletconnect signature request (#1124)

* handle walletconnect signature request

* Update packages/files-ui/src/Contexts/ThresholdKeyContext.tsx

Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* fix lint

Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>

* Remove Facebook login (#1136)

* hide facebook login

* lingui extract

Co-authored-by: GitHub Actions <actions@github.com>

* email button disabled like others (#1137)

Co-authored-by: Shiva <82167447+RamidiShiva@users.noreply.github.com>
Co-authored-by: Cindy Chau <47398578+sweetpea22@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
Co-authored-by: Tanmoy Basak Anjan <tanmoy3399@gmail.com>
Co-authored-by: Andrew Snaith <asnaith@users.noreply.github.com>
Co-authored-by: Thibaut Sardan <github@thib.top>
Co-authored-by: Priom Chowdhury <priom@chainsafe.io>
Co-authored-by: Ryan Noble <ryanjnoble@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Maintenance Added to issues and PRs when a change is for repository maintenance , such as CI or linter changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants