-
Notifications
You must be signed in to change notification settings - Fork 394
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
feat(@spartacus/storefront): Adding different viewports to e2e testing (GH-1321) #1615
Conversation
Tests should be placed only in smoke/regression directories, not in |
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.
Avoid using should('exist')
assertion. cy.get
would fail if an element does not exist. No need to double check that. Look also at my other comment about files location.
I agree with the file location. Very sorry! I forgot to move it, I was supposed to ask where I should put them yesterday, but for the assertion I kind of disagree. Here it says we don't need to write .should('exist') as cy.get already does that, and that if we do chain any .should() command, it would no longer do the default assertion. I find that its better to explicitly say it other than implicitly because its more verbose and readable. For example, when a new developer starts working on cypress looks at cy.get('xx'), they probably would not know what it does unless they read the documentation, however, when they do cy.get('xx').should('exist'), they would understand it as it needs to exists in the dom If you chain any .should() command, the default .should('exist') is not asserted. What do you think? |
projects/storefrontapp-e2e-cypress/cypress/helpers/added-to-cart-modal.ts
Outdated
Show resolved
Hide resolved
projects/storefrontapp-e2e-cypress/cypress/helpers/added-to-cart-modal.ts
Show resolved
Hide resolved
projects/storefrontapp-e2e-cypress/cypress/helpers/added-to-cart-modal.ts
Outdated
Show resolved
Hide resolved
projects/storefrontapp-e2e-cypress/cypress/helpers/added-to-cart-modal.ts
Outdated
Show resolved
Hide resolved
projects/storefrontapp-e2e-cypress/cypress/helpers/added-to-cart-modal.ts
Outdated
Show resolved
Hide resolved
projects/storefrontapp-e2e-cypress/cypress/helpers/big-happy-path.ts
Outdated
Show resolved
Hide resolved
projects/storefrontapp-e2e-cypress/cypress/helpers/big-happy-path.ts
Outdated
Show resolved
Hide resolved
projects/storefrontapp-e2e-cypress/cypress/helpers/big-happy-path.ts
Outdated
Show resolved
Hide resolved
projects/storefrontapp-e2e-cypress/cypress/helpers/big-happy-path.ts
Outdated
Show resolved
Hide resolved
projects/storefrontapp-e2e-cypress/cypress/helpers/big-happy-path.ts
Outdated
Show resolved
Hide resolved
projects/storefrontapp-e2e-cypress/cypress/helpers/big-happy-path.ts
Outdated
Show resolved
Hide resolved
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.
Move all mobile tests to a subfolder 'mobile' under regression.
discussed with the team in Montreal
Closes #1321
Some mobile viewports for an e2e test does not exist at it was not necessary since it does not interact with mobile features, such as the hamburger, product search, and filter.