Skip to content

test(cypress): add BankRedirect Ideal mandate and PayLater AfterpayClearpay coverage for stripe#13165

Open
venkatakarthikm-maker wants to merge 2 commits into
mainfrom
payauto
Open

test(cypress): add BankRedirect Ideal mandate and PayLater AfterpayClearpay coverage for stripe#13165
venkatakarthikm-maker wants to merge 2 commits into
mainfrom
payauto

Conversation

@venkatakarthikm-maker

@venkatakarthikm-maker venkatakarthikm-maker commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Closes #13166

Summary

Added Cypress test coverage for two Stripe connector scenarios that were previously untested:

Scenario PM PMT API Status
Mandate setup (setup_future_usage + mandate_data) BankRedirect Ideal POST /payments Covered
Base payment authorization PayLater AfterpayClearpay POST /payments Covered

Sofort mandate setup was identified as missing but excluded — the Stripe connector backend does not implement Sofort payment method data conversion (returns 501 NotImplemented).

Changes

  1. Stripe.js — Added Ideal.MandateSingleUseAutoCapture config under bank_redirect_pm with setup_future_usage, mandate_data (single_use), and customer_acceptance
  2. Stripe.js — Added AfterpayClearpayAutoCapture + AfterpayClearpay configs under pay_later_pm with billing, shipping, and order_details
  3. Utils.js — Added "stripe" to BANK_REDIRECT_MANDATE and AFTERPAY_CLEARPAY include lists
  4. Commons.js — Added TRIGGER_SKIP: true to OpenBankingUk.MandateSingleUseAutoCapture and Trustly.MandateSingleUseAutoCapture fallbacks so unsupported connectors skip gracefully

Verification

  • iDEAL CIT mandate test — passes for Stripe
  • AfterpayClearpay PayLater test — un-gated for Stripe
  • OpenBankingUk/Trustly CIT mandate tests — skip via TRIGGER_SKIP for Stripe
  • Adyen tests — unaffected (Adyen has its own config overrides that take priority)

@venkatakarthikm-maker venkatakarthikm-maker self-assigned this Jul 5, 2026
@venkatakarthikm-maker venkatakarthikm-maker requested a review from a team as a code owner July 5, 2026 18:45
@semanticdiff-com

semanticdiff-com Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  cypress-tests/cypress/e2e/configs/Payment/Commons.js  0% smaller
  cypress-tests/cypress/e2e/configs/Payment/Stripe.js  0% smaller
  cypress-tests/cypress/e2e/configs/Payment/Utils.js  0% smaller

@venkatakarthikm-maker venkatakarthikm-maker added the S-test-ready Status: This PR is ready for cypress-tests label Jul 5, 2026
@HS-QUALIBOT HS-QUALIBOT changed the title adding cypress coverage for stripe for ideal bank redirect and Afterp… test(cypress): add BankRedirect Ideal mandate and PayLater AfterpayClearpay coverage for stripe Jul 5, 2026
@XyneSpaces

Copy link
Copy Markdown

get_comments

@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jul 5, 2026
@XyneSpaces

Copy link
Copy Markdown

[should-fix] AfterpayClearpayAutoCapture expected status appears incorrect

File: cypress-tests/cypress/e2e/configs/Payment/Stripe.js (around line 1537)

The test configuration for AfterpayClearpayAutoCapture with capture_method: "automatic" expects status "requires_payment_method", which suggests a failure/unconfigured state rather than a successful auto-capture flow.

AfterpayClearpayAutoCapture: {
  Request: { capture_method: "automatic", ... },
  Response: {
    status: 200,
    body: {
      status: "requires_payment_method",  // ← Verify this is intentional
    },
  },
}

With automatic capture and valid payment method data, the expected status would typically be requires_customer_action (for redirect) or succeeded. Please confirm this assertion is intentional (e.g., testing Stripe's unconfigured state) or update to the correct expected status.

@venkatakarthikm-maker venkatakarthikm-maker added the S-test-ready Status: This PR is ready for cypress-tests label Jul 5, 2026
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jul 5, 2026
@venkatakarthikm-maker venkatakarthikm-maker added the S-test-ready Status: This PR is ready for cypress-tests label Jul 5, 2026
@github-actions github-actions Bot removed the S-test-ready Status: This PR is ready for cypress-tests label Jul 5, 2026
@XyneSpaces

Copy link
Copy Markdown

💡 Consider adding validation for the new test configurations

The PR adds Ideal.MandateSingleUseAutoCapture and AfterpayClearpay configurations to Stripe.js. These configurations include setup_future_usage and mandate_data which are complex nested objects.

Consider adding a test that validates the structure of these configs at load time to catch typos or schema mismatches early.

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.

Add Cypress coverage for Stripe BankRedirect Ideal mandate and PayLater AfterpayClearpay

2 participants