Skip to content

fix(cypress): add new locale coverage, fix cashtocode redirect and connector payment_experience - #1766

Merged
ArushKapoorJuspay merged 4 commits into
mainfrom
fix/cypress-locale-and-connector-config
Sep 11, 2026
Merged

ArushKapoorJuspay merged 4 commits into
mainfrom
fix/cypress-locale-and-connector-config

Conversation

@preetamrevankar

@preetamrevankar preetamrevankar commented Sep 10, 2026 •

Copy link
Copy Markdown
Collaborator

Type of Change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring
  • Dependency updates
  • Documentation
  • CI/CD

Description

Fixes two failing Cypress specs, adds locale coverage for the newly supported languages, and fixes a connector config bug that was silently hiding test failures.

1. Locale coverage for 13 new locales + French CVC fix (locale-i18n.cy.ts)

FrenchLocale.res renamed cvcTextLabel from Code CVC to CVC, but the spec still expected the old string, so should display translated card labels in French (fr) was failing.

Adds lt, cs, sk, is, cy, el, et, fi, nb, bs, da, ms, tr-CY to the shared expectations table, which extends the card-label, expiry, error-message and text-direction suites, plus new billing-header cases and a block covering the alias paths in LocaleStringHelper (no/nn → nb, tr → tr-CY, regional variants → base language).

Every expected string was cross-checked programmatically against src/LocaleStrings/*.res (21 locale entries / 105 string assertions / 21 billing entries → 0 mismatches), and all 16 alias cases against the match arms in LocaleStringHelper.res.

2. CashtoCode e-voucher redirect host (04-cashtocode-evoucher.cy.ts)

CashtoCode now serves E-voucher from the same WCL sandbox host as Cash / Voucher, so asserting on the retired dev.evoucher.cashtocode.com timed out. The sibling voucher spec has asserted the WCL host since #1199.

Matches the host pattern rather than a fixed cluster, since the cluster number is assigned per request:

-cy.url().should("include", "https://dev.evoucher.cashtocode.com/");
+cy.url().should("match", /^https:\/\/cluster\d+\.wcl-test\.cashtocode\.com\//);

3. payment_experience for cryptopay and mifinity (setup.js)

Without payment_experience, /account/payment_methods returned an empty array for these connectors. The SDK then rendered its "Oops, something went wrong!" state, and selectPaymentMethodOrSkip read the missing tab as "connector unavailable" and skipped the test — so both specs reported green while never exercising the flow.

Mirrors juspay/hyperswitch cypress-tests/configs/Payment/Commons.js, which sets payment_experience: "redirect_to_url" on both. Every other non-card connector here (adyen wallet, cashtocode reward, fiuu, klarna, stripe) already set it.

4. Removes card-elements.cy.ts (02-cards/card-elements.cy.ts)

This spec was contributed externally and was not working, so it is removed rather than left failing. Verified nothing else references it — no imports, no references from other specs, setup.js, or the CI workflow.

How did you test it?

Full suite run against integ (43 specs, 432 tests).

Spec Result
locale-i18n.cy.ts 162/162 passing
03-cashtocode-voucher.cy.ts 3/3 passing
04-cashtocode-evoucher.cy.ts 3/3 passing

The payment_experience fix was verified by provisioning a fresh merchant and probing the API directly:

before: cryptopay USD -> EMPTY                  cryptopay EUR -> EMPTY
after:  cryptopay USD -> crypto:crypto_currency cryptopay EUR -> crypto:crypto_currency

Known issues surfaced, not fixed here

  • CryptoPay ip_not_allowed. With the fix the crypto spec now runs instead of skipping, and fails honestly at the redirect: CryptoPay rejects the call with error_code: ip_not_allowed. The integ backend's egress IP is not allowlisted on the CryptoPay account behind creds.json — an account-level setting, not fixable in this repo. Upstream never hits this because their runner-optional-connectors job (the only place cryptopay appears) is if: false.
  • Mifinity is unverified. Same fix applied on the same fault signature, but there is no mifinity entry in the local creds.json, so the spec aborts before running. It should get its first real exercise in CI.
  • selectPaymentMethodOrSkip masks failures. It cannot distinguish "connector not enabled" from "SDK crashed", which is what let this sit undetected. Worth making it fail when the iframe contains the SDK error text — deliberately left out of this PR, since it would turn crypto red until the IP allowlist is sorted.
  • Pre-existing external-3DS failures (Redsys 2, Netcetera 3) are unrelated to these changes. Two of the Netcetera ones look like a spec bug — cy.should() chained across a page transition, detaching the subject.

Checklist

  • I ran npm run re:build
  • I reviewed submitted code
  • I added unit tests for my changes where possible

🤖 Generated with Claude Code

https://claude.ai/code/session_017ajpRiEKsb5oQEynPxigLN

preetamrevankar and others added 4 commits September 10, 2026 20:11
The French `cvcTextLabel` was renamed from "Code CVC" to "CVC" in
FrenchLocale.res, but the spec still expected the old string, failing
"should display translated card labels in French (fr)".

Adds the newly supported locales (lt, cs, sk, is, cy, el, et, fi, nb,
bs, da, ms, tr-CY) to the shared expectations table, which extends the
card-label, expiry, error-message and text-direction suites, plus new
billing-header cases and a block covering the alias paths in
LocaleStringHelper (no/nn -> nb, tr -> tr-CY, regional variants).

Every expected string was cross-checked against src/LocaleStrings/*.res.

Verified on integ: 162/162 passing.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ajpRiEKsb5oQEynPxigLN
CashtoCode now serves the E-voucher flow from the same WCL sandbox host
as Cash / Voucher, so the assertion on the retired
dev.evoucher.cashtocode.com host timed out.

Matches the host pattern rather than a fixed cluster number, since the
cluster is assigned per request. The sibling voucher spec pins
cluster05 and will break the same way whenever that rotates.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ajpRiEKsb5oQEynPxigLN
Without payment_experience the payment methods list returned an empty
array for these two connectors, so the SDK rendered its error state and
selectPaymentMethodOrSkip treated the missing tab as "connector
unavailable" and skipped the test. The specs then reported green while
never exercising the flow.

Mirrors juspay/hyperswitch cypress-tests configs/Payment/Commons.js,
which sets payment_experience: "redirect_to_url" on both. Every other
non-card connector here (adyen wallet, cashtocode reward, fiuu, klarna,
stripe) already set it.

Verified against integ on a freshly provisioned merchant:

  before: cryptopay USD -> EMPTY
  after:  cryptopay USD -> crypto:crypto_currency

The crypto spec now runs instead of skipping, and fails honestly at the
redirect: CryptoPay rejects the call with error_code "ip_not_allowed"
because the integ backend's egress IP is not allowlisted on the
CryptoPay account behind creds.json. That is an account-level setting,
not a config issue here.

Mifinity carries the same fix but is unverified: there is no mifinity
entry in the local creds.json, so the spec aborts before running.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ajpRiEKsb5oQEynPxigLN
These tests were contributed externally and were not working, so the
spec is removed rather than left failing. Nothing else references it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017ajpRiEKsb5oQEynPxigLN
@semanticdiff-com

semanticdiff-com Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

Comment thread cypress-tests/cypress/e2e/02-cards/card-elements.cy.ts
@ArushKapoorJuspay
ArushKapoorJuspay merged commit 9c448fb into main Sep 11, 2026
19 of 23 checks passed
@ArushKapoorJuspay
ArushKapoorJuspay deleted the fix/cypress-locale-and-connector-config branch September 11, 2026 05:01
@github-actions github-actions Bot added the Closed Label will be automatically added when the PR will get merged to main label Sep 11, 2026

This branch was previously deployed

1 inactive deployment
Testing — a9581732 Deployed Sep 10, 2026 by preetamrevankar via cypress (05-external-3ds) #3255
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Closed Label will be automatically added when the PR will get merged to main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(cypress): add new locale coverage, fix cashtocode redirect and connector payment_experience- #1766

3 participants