-
Notifications
You must be signed in to change notification settings - Fork 12
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
PP-10904 Make Worldpay Cypress tests standalone #3541
Conversation
iqbalgds
commented
Jun 21, 2023
- Cypress best practices suggest that having tests rely on the state of previous tests is an anti-pattern.
- Combine tests and remove use of Cypress.Cookies.preserveOnce() so that tests can be run independently.
test/cypress/integration/worldpay-3ds-flex-ddc/payment-with-session-id.cy.test.js
Show resolved
Hide resolved
3d06506
to
2cecdce
Compare
test/cypress/integration/worldpay-3ds-flex-ddc/payment-with-session-id.cy.test.js
Outdated
Show resolved
Hide resolved
2cecdce
to
20eafc9
Compare
test/cypress/integration/worldpay-3ds-flex-ddc/payment-with-session-id.cy.test.js
Outdated
Show resolved
Hide resolved
test/cypress/integration/worldpay-3ds-flex-ddc/payment-with-session-id.cy.test.js
Outdated
Show resolved
Hide resolved
cy.server() | ||
cy.route('POST', `/check_card/${chargeId}`).as('checkCard') | ||
|
||
cy.log('Should enter payment details') |
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.
Can the code to enter payment details be extracted into a separate method for reuse?
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.
Good idea - will do that.
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 this done?
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.
Yes - this is done, thanks.
test/cypress/integration/worldpay-3ds-flex-ddc/payment-with-session-id.cy.test.js
Outdated
Show resolved
Hide resolved
- Cypress best practices suggest that having tests rely on the state of previous tests is an anti-pattern. - Combine tests and remove use of Cypress.Cookies.preserveOnce() so that tests can be run independently.
20eafc9
to
fec2551
Compare