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

Profile and username add tests #1834

Merged
merged 13 commits into from
Jan 5, 2022
Merged

Profile and username add tests #1834

merged 13 commits into from
Jan 5, 2022

Conversation

tanmoyAtb
Copy link
Contributor

closes #1830

@render
Copy link

render bot commented Dec 20, 2021

@render
Copy link

render bot commented Dec 20, 2021

@render
Copy link

render bot commented Dec 20, 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 Dec 20, 2021
@tanmoyAtb tanmoyAtb changed the title Mnt/username names edit test 1830 Profile and username add tests Dec 21, 2021
@tanmoyAtb
Copy link
Contributor Author

Everything seems to be working well, But cy.web3Login() seems to be logging into the same account everytime its called. This is why if we run the tests second time in a session, add username fails as this user already has a username.

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.

If you use the Cypress interface, relaunching with the refresh button will not refresh the session. I guess the auto-reload function when the code changes does the same, the user will be logged in, and the sessions re-used. I launched it locally to check and can attest there's a new user created, with a new username, and all was green when launched for the first time.

If you want to test this locally, you need to close the browser (chrome) and relaunch the test manually.

packages/files-ui/cypress/tests/settings-spec.ts Outdated Show resolved Hide resolved
@tanmoyAtb tanmoyAtb marked this pull request as ready for review December 25, 2021 09:08
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.

Looks good, just a small suggestion.

packages/files-ui/cypress/tests/settings-spec.ts Outdated Show resolved Hide resolved
Co-authored-by: Thibaut Sardan <33178835+Tbaut@users.noreply.github.com>
@tanmoyAtb tanmoyAtb requested review from asnaith and FSM1 January 3, 2022 16:44
@asnaith
Copy link
Member

asnaith commented Jan 4, 2022

Everything seems to be working well, But cy.web3Login() seems to be logging into the same account everytime its called. This is why if we run the tests second time in a session, add username fails as this user already has a username.

Ah yes, I can see how this would cause an issue when repeating the test within the same session but this is just something we do in development whilst creating the test. I wrap the it in a loop to run the test many times to check its reliability before checking in, I guess this is what you were trying too?

When it's running as part of the suite that gets executed against PRs we will be fine 😊

@asnaith
Copy link
Member

asnaith commented Jan 4, 2022

This is great Tanmoy, an excellent first foray into UI test writing! Thanks for this 🙏

@Tbaut Tbaut enabled auto-merge (squash) January 5, 2022 10:57
@Tbaut Tbaut merged commit 3f1ea58 into dev Jan 5, 2022
@Tbaut Tbaut deleted the mnt/username-names-edit-test-1830 branch January 5, 2022 10:58
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.

Add ui test coverage for username creation / name editing
4 participants