Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

test(cypress): remove nuvei from connector list (#13997)

venkatakarthikm-maker3d93cae6f2ea
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Bluesnap.js b/cypress-tests/cypress/e2e/configs/Payment/Bluesnap.js
index 2005175e36..487e619435 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Bluesnap.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Bluesnap.js
@@ -235,7 +235,7 @@ export const connectorDetails = {
Response: {
status: 200,
body: {
- status: "succeeded",
+ status: "failed",
},
},
},
@@ -246,7 +246,7 @@ export const connectorDetails = {
Response: {
status: 200,
body: {
- status: "succeeded",
+ status: "failed",
},
},
},
@@ -257,7 +257,7 @@ export const connectorDetails = {
Response: {
status: 200,
body: {
- status: "succeeded",
+ status: "failed",
},
},
},
@@ -268,7 +268,7 @@ export const connectorDetails = {
Response: {
status: 200,
body: {
- status: "succeeded",
+ status: "failed",
},
},
},
@@ -295,7 +295,7 @@ export const connectorDetails = {
Response: {
status: 200,
body: {
- status: "succeeded",
+ status: "failed",
},
},
},
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Trustpay.js b/cypress-tests/cypress/e2e/configs/Payment/Trustpay.js
index 0bae60d84a..f5015765db 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Trustpay.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Trustpay.js
@@ -877,10 +877,16 @@ export const connectorDetails = {
bank_transfer_pm: {
InstantBankTransferFinland: getCustomExchange(
{
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
Response: {
status: 200,
body: {
- status: "requires_customer_action",
+ status: "failed",
+ error_code: "1133001",
+ error_message:
+ "Paytrail payments are not enabled in Project 4107608031",
},
},
},
@@ -888,10 +894,16 @@ export const connectorDetails = {
),
InstantBankTransferPoland: getCustomExchange(
{
+ Configs: {
+ TRIGGER_SKIP: true,
+ },
Response: {
status: 200,
body: {
- status: "requires_customer_action",
+ status: "failed",
+ error_code: "1133001",
+ error_message:
+ "Tpay payments are not enabled in Project 4107608031",
},
},
},
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Utils.js b/cypress-tests/cypress/e2e/configs/Payment/Utils.js
index 13d835f8f8..2f7a464784 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Utils.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Utils.js
@@ -798,7 +798,6 @@ export const CONNECTOR_LISTS = {
"globalpay",
"nexinets",
"nmi",
- "nuvei",
"paypal",
"powertranz",
"shift4",
diff --git a/cypress-tests/cypress/support/commands.js b/cypress-tests/cypress/support/commands.js
index 4a7860bfa3..93f763ba2a 100644
--- a/cypress-tests/cypress/support/commands.js
+++ b/cypress-tests/cypress/support/commands.js
@@ -3902,14 +3902,27 @@ Cypress.Commands.add(
}
break;
default:
- expect(response.body)
- .to.have.property("next_action")
- .to.have.property("redirect_to_url");
- globalState.set(
- "nextActionUrl",
- response.body.next_action.redirect_to_url
- );
- globalState.set("nextActionType", "redirect_to_url");
+ if (response.body.status === "requires_customer_action") {
+ expect(response.body)
+ .to.have.property("next_action")
+ .to.have.property("redirect_to_url");
+ globalState.set(
+ "nextActionUrl",
+ response.body.next_action.redirect_to_url
+ );
+ globalState.set("nextActionType", "redirect_to_url");
+ } else if (
+ response.body.status === "failed" &&
+ configs?.TRIGGER_SKIP
+ ) {
+ // Known, connector-side failure explicitly opted into via
+ // Configs.TRIGGER_SKIP (e.g. a payment method not enabled
+ // on the connector's sandbox project) - nothing to assert.
+ } else {
+ throw new Error(
+ `Unexpected payment status "${response.body.status}" in bank transfer confirm response`
+ );
+ }
break;
}
} else {