ci(cypress): fix worldpayxml, and deutschebank cypress test cases (#8193)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Arindam Sahoo
2025-07-04 19:44:36 +05:30
committed by GitHub
parent 41291e5cde
commit b937cb73f9
6 changed files with 360 additions and 35 deletions

View File

@ -2442,6 +2442,9 @@ Cypress.Commands.add(
"payment_method_id"
).to.include("pm_").and.to.not.be.null;
// Whenever, CIT Confirmations gets a payment status of `processing`, it does not yield the `payment_method_id` and hence the `paymentMethodId` in the `globalState` gets the value of `null`. And hence while confirming MIT, it yields an `error.message` of `"Json deserialize error: invalid type: null, expected a string at line 1 column 182"` which is basically because of the `null` value in `recurring_details.data` with `recurring_details.type` as `payment_method_id`. However, we get the `payment_method_id` while PSync, so we can assign it to the `globalState` here.
globalState.set("paymentMethodId", response.body.payment_method_id);
const allowedActiveStatuses = [
"succeeded",
"requires_capture",