Skip to content

feat(tests): add new cypress test suites and update existing tests for matrix coverage - #1555

Open
preetamrevankar wants to merge 22 commits into
mainfrom
cypress-matrix-fill
Open

feat(tests): add new cypress test suites and update existing tests for matrix coverage#1555
preetamrevankar wants to merge 22 commits into
mainfrom
cypress-matrix-fill

Conversation

@preetamrevankar

@preetamrevankar preetamrevankar commented May 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Added new Cypress test suites for expanded payment method coverage: 3DS Adyen card flow, ACH Stripe & SEPA Adyen bank transfers, Klarna and Afterpay redirect alternative payments
  • Updated existing test files across all categories (SDK core, cards, bank transfers, alternative payments, external 3DS) for consistency and matrix compatibility
  • Extended cards.ts support data, updated paymentMethods.json fixtures, and improved eslint.config.cjs, TestUtils.res, Input.res, PaymentField.res, and BankDebitModal.res

#1597

Type of Change

  • Bug fix
  • New feature / test coverage
  • Refactor
  • Documentation

Test Coverage

New test files added:

  • cypress/e2e/02-cards/09-card-3ds-adyen.cy.ts
  • cypress/e2e/03-bank-transfers/02-ach-stripe.cy.ts
  • cypress/e2e/03-bank-transfers/03-sepa-adyen.cy.ts
  • cypress/e2e/04-alternative-payments/06-klarna-redirect.cy.ts
  • cypress/e2e/04-alternative-payments/07-afterpay-redirect.cy.ts

Notes

  • .env and cypress.env.json are intentionally excluded from this PR as they contain secrets

preetamrevankar and others added 21 commits March 30, 2026 14:30
- Add defaultBillingAddress constant to utils.ts and reuse across test files
- Replace hardcoded profile IDs with connectorProfileIdMapping references
- Refactor mandate-card-flow-cybersource to use beforeEach for shared state setup
- Use cy.get('#submit').should('be.visible').click() consistently
- Restore removed comments in run-automation-test.yml
- Remove section divider banner comments from locale-i18n.cy.ts
- Fix failing tests: rewrite sdk-error-handling network/timeout tests to use
  cy.intercept for browser-level requests instead of cy.request; fix
  keyboard-accessibility focus tests to use click() instead of focus().should('be-focused');
  fix error-announcement test to touch field before submitting
- Remove default-values-prefill.cy.ts (unreliable prefill flow)
- Replace delete operator with removeObjectKey in terms-display and custom-card-terms
- Remove unused component-index.html and component.js support files
- Fix San Francisco spelling across utils.ts, billing-fields-visibility, mifinity
- Remove commented-out component block from cypress.config.js
- Replace 'any' with proper cardDetails type in types.ts
- Remove 'as string' casts from billing-fields-visibility.cy.ts
- Remove verbose AI-generated JSDoc from locale-i18n.cy.ts
- Use .should('be.visible') before .click() on submit in element-lifecycle-test
- Replace hardcoded billing address with defaultBillingAddress in dynamic-fields-comprehensive
…ake cardScheme optional

- Fix broken indentation in createPaymentBody.billing.address (state-lastDoe fields
  were outside the address block, missing closing braces for address and billing)
- Restore missing defaultBillingAddress export that was lost in previous edit
- Make cardScheme optional in cardDetails type to avoid breaking pre-existing
  test call sites that don't pass cardScheme
waitForSDKReady now waits for the card input to be visible inside
the iframe, ensuring React has fully mounted the card form and
registered submitCallback before any test interaction begins.

The empty form submission tests also gained an explicit card input
visibility guard, a not-be-disabled check on the submit button, and
a doubled error-assertion timeout (5 s -> 10 s) to eliminate the
race condition where background SDK initialisations (e.g. Google Pay
loading) delayed validation-error rendering beyond the old timeout.
@semanticdiff-com

semanticdiff-com Bot commented May 14, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  cypress-tests/cypress/fixtures/paymentMethods.json  40% smaller
  Hyperswitch-React-Demo-App/package-lock.json  17% smaller
  cypress-tests/cypress/e2e/02-cards/04-card-cybersource.cy.ts  17% smaller
  cypress-tests/cypress/e2e/02-cards/05-card-trustpay.cy.ts  17% smaller
  cypress-tests/cypress/e2e/02-cards/06-card-bank-of-america.cy.ts  17% smaller
  cypress-tests/cypress/e2e/04-alternative-payments/01-crypto.cy.ts  17% smaller
  cypress-tests/cypress/e2e/04-alternative-payments/02-mifinity.cy.ts  17% smaller
  cypress-tests/cypress/e2e/04-alternative-payments/03-cashtocode-voucher.cy.ts  17% smaller
  cypress-tests/cypress/e2e/04-alternative-payments/04-cashtocode-evoucher.cy.ts  17% smaller
  cypress-tests/cypress/e2e/04-alternative-payments/05-loonie-interac.cy.ts  17% smaller
  cypress-tests/cypress/e2e/05-external-3ds/01-redsys-3ds.cy.ts  17% smaller
  cypress-tests/cypress/e2e/05-external-3ds/02-netcetera-3ds.cy.ts  17% smaller
  cypress-tests/cypress/e2e/05-external-3ds/03-juspay-3ds.cy.ts  17% smaller
  cypress-tests/cypress/e2e/03-bank-transfers/01-trustpay-redirect.cy.ts  17% smaller
  eslint.config.cjs  11% smaller
  package-lock.json  9% smaller
  cypress-tests/cypress/e2e/02-cards/09-card-3ds-adyen.cy.ts  0% smaller
  cypress-tests/cypress/e2e/02-cards/billing-fields-visibility.cy.ts  0% smaller
  cypress-tests/cypress/e2e/02-cards/dynamic-fields-comprehensive.cy.ts  0% smaller
  cypress-tests/cypress/e2e/03-bank-transfers/02-ach-stripe.cy.ts  0% smaller
  cypress-tests/cypress/e2e/03-bank-transfers/03-sepa-adyen.cy.ts  0% smaller
  cypress-tests/cypress/e2e/04-alternative-payments/06-klarna-redirect.cy.ts  0% smaller
  cypress-tests/cypress/e2e/04-alternative-payments/07-afterpay-redirect.cy.ts  0% smaller
  cypress-tests/cypress/support/cards.ts  0% smaller
  cypress-tests/package-lock.json  0% smaller
  package.json  0% smaller
  shared-code  0% smaller
  src/Components/Input.res Unsupported file format
  src/Components/PaymentField.res Unsupported file format
  src/Payments/BankDebitModal.res Unsupported file format
  src/Utilities/TestUtils.bs.d.ts  0% smaller
  src/Utilities/TestUtils.res Unsupported file format

@github-actions

Copy link
Copy Markdown
Contributor

🚫 Missing Linked Issue

Hi 👋 This pull request does not appear to be linked to any open issue yet.

Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically.

✔️ How to fix this

  • Add a keyword like Fixes #123 or Closes #456 to your PR description or a commit message.
  • Or link it manually using the "Linked issues" panel in the PR sidebar.

Tip: You can link multiple issues.
🚫 Note: If only one issue is linked, it must be open for this check to pass.

Once linked, this check will pass automatically on your next push or when you re-run the workflow.

Thanks for helping maintainers! 🙌

@preetamrevankar preetamrevankar added the DO NOT MERGE Use this label if you want your PR to restrict from merging label May 14, 2026
aritro2002

This comment was marked as off-topic.

# Conflicts:
#	cypress-tests/cypress/e2e/01-sdk-core/layout-accordion.cy.ts
#	cypress-tests/cypress/e2e/01-sdk-core/layout-grid-tabs.cy.ts
#	cypress-tests/cypress/e2e/01-sdk-core/layout-spaced-accordion.cy.ts
#	cypress-tests/cypress/e2e/01-sdk-core/layout-tabs.cy.ts
#	cypress-tests/cypress/e2e/01-sdk-core/locale-i18n.cy.ts
#	cypress-tests/cypress/e2e/01-sdk-core/submit-button-states.cy.ts
#	cypress-tests/cypress/e2e/01-sdk-core/themes.cy.ts
#	cypress-tests/cypress/e2e/02-cards/cobadge-card-flow-cybersource.cy.ts
#	cypress-tests/cypress/e2e/02-cards/mandate-card-flow-cybersource.cy.ts
#	cypress-tests/cypress/support/cards.ts
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

🚫 Missing Linked Issue

Hi 👋 This pull request does not appear to be linked to any open issue yet.

Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically.

✔️ How to fix this

  • Add a keyword like Fixes #123 or Closes #456 to your PR description or a commit message.
  • Or link it manually using the "Linked issues" panel in the PR sidebar.

Tip: You can link multiple issues.
🚫 Note: If only one issue is linked, it must be open for this check to pass.

Once linked, this check will pass automatically on your next push or when you re-run the workflow.

Thanks for helping maintainers! 🙌

1 similar comment
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

🚫 Missing Linked Issue

Hi 👋 This pull request does not appear to be linked to any open issue yet.

Linking your PR to an issue helps keep the project tidy and ensures the issue is closed automatically.

✔️ How to fix this

  • Add a keyword like Fixes #123 or Closes #456 to your PR description or a commit message.
  • Or link it manually using the "Linked issues" panel in the PR sidebar.

Tip: You can link multiple issues.
🚫 Note: If only one issue is linked, it must be open for this check to pass.

Once linked, this check will pass automatically on your next push or when you re-run the workflow.

Thanks for helping maintainers! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO NOT MERGE Use this label if you want your PR to restrict from merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants