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

PP-10904 Make Worldpay Cypress tests standalone #3541

Merged
merged 1 commit into from
Jul 13, 2023

Conversation

iqbalgds
Copy link
Contributor

  • 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.

@iqbalgds iqbalgds changed the title PP-10904 Make Wolrdpay Cypress tests standalone PP-10904 Make Worldpay Cypress tests standalone Jun 21, 2023
@iqbalgds iqbalgds force-pushed the pp-10904-make-3ds-flex-cy-tests-standalone branch 3 times, most recently from 3d06506 to 2cecdce Compare July 10, 2023 21:24
@iqbalgds iqbalgds force-pushed the pp-10904-make-3ds-flex-cy-tests-standalone branch from 2cecdce to 20eafc9 Compare July 11, 2023 07:21
cy.server()
cy.route('POST', `/check_card/${chargeId}`).as('checkCard')

cy.log('Should enter payment details')
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this done?

Copy link
Contributor Author

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.

- 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.
@iqbalgds iqbalgds force-pushed the pp-10904-make-3ds-flex-cy-tests-standalone branch from 20eafc9 to fec2551 Compare July 13, 2023 15:26
@iqbalgds iqbalgds merged commit c0176ef into master Jul 13, 2023
5 checks passed
@iqbalgds iqbalgds deleted the pp-10904-make-3ds-flex-cy-tests-standalone branch July 13, 2023 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants