-
Notifications
You must be signed in to change notification settings - Fork 16
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
Optimize tests #1027
Merged
Merged
Optimize tests #1027
Changes from 7 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
2b4e6ba
get started
1123215
wip
f8831fd
it is working
203d922
cleanup
d99fcbf
lint and cleanup
f8f30a7
navigate to setting on pc and phone (different views)
03e93c1
Merge branch 'dev' into mnt/tbaut-optimize-tests
Tbaut ccd6cdb
more settings test, remove Sharedtransfermodal
ca8c704
Merge branch 'mnt/tbaut-optimize-tests' of github.com:ChainSafe/files…
e041aec
Merge branch 'dev' into mnt/tbaut-optimize-tests
Tbaut cbe00cc
Update packages/files-ui/cypress/integration/settings.ts
Tbaut 17e1174
Update packages/files-ui/cypress/support/commands.ts
Tbaut File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
describe("Settings", () => { | ||
it("can navigate to the settings profile page", () => { | ||
cy.web3Login() | ||
cy.get("[data-cy=settings-nav]").click() | ||
cy.get("[data-cy=settings-profile-header").should("be.visible") | ||
cy.url().should("include", "/settings") | ||
}) | ||
|
||
it("can navigate to the settings security page on a phone", () => { | ||
cy.viewport("iphone-6") | ||
cy.web3Login() | ||
cy.get(".hamburger-menu").click() | ||
cy.get("[data-cy=settings-nav]").click() | ||
cy.get("[data-cy=settings-profile-header]").should("not.exist") | ||
cy.url().should("include", "/settings") | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there perhaps a way we could make these markers constant or avoid needing magic strings?
CC: @FSM1 @tanmoyAtb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I misunderstood what you mean but those data-cy are based on Cypress best practices, to make sure tests fail as little as possible, even when changing the copy, or the classes https://docs.cypress.io/guides/references/best-practices#Selecting-Elements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean we could have a bunch of string constants, but I dont know if there is much benefit to be had yet. If we do start feeling overwhelmed by this, its easy enough to Ctrl+f data-cy and fix it later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah now I get it. This is not something that should ever change, so I don't think we would get any benefit from having a list of strings there indeed.