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

feat(cypress): make tests forcefully skippable (#5176)

Pa1NarKbf9893e2306a
diff --git a/cypress-tests/cypress/e2e/PaymentTest/00010-CreateSingleuseMandate.cy.js b/cypress-tests/cypress/e2e/PaymentTest/00010-CreateSingleuseMandate.cy.js
index 1f37b061ec..b03b74e2da 100644
--- a/cypress-tests/cypress/e2e/PaymentTest/00010-CreateSingleuseMandate.cy.js
+++ b/cypress-tests/cypress/e2e/PaymentTest/00010-CreateSingleuseMandate.cy.js
@@ -137,7 +137,7 @@ describe("Card - SingleUse Mandates flow test", () => {
);
context(
- "Card - ThreeDS Create + Confirm Manual CIT and MIT payment flow test",
+ "Card - No threeDS Create + Confirm Manual CIT and MIT payment flow test",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
diff --git a/cypress-tests/cypress/e2e/PaymentUtils/Bluesnap.js b/cypress-tests/cypress/e2e/PaymentUtils/Bluesnap.js
index d8995661e0..6cfc84de43 100644
--- a/cypress-tests/cypress/e2e/PaymentUtils/Bluesnap.js
+++ b/cypress-tests/cypress/e2e/PaymentUtils/Bluesnap.js
@@ -43,6 +43,7 @@ export const connectorDetails = {
},
Response: {
status: 200,
+ trigger_skip: true,
body: {
status: "requires_capture",
},
@@ -59,6 +60,7 @@ export const connectorDetails = {
},
Response: {
status: 200,
+ trigger_skip: true,
body: {
status: "succeeded",
},
diff --git a/cypress-tests/cypress/e2e/PaymentUtils/Paypal.js b/cypress-tests/cypress/e2e/PaymentUtils/Paypal.js
index 7c109b9816..14e69feb3f 100644
--- a/cypress-tests/cypress/e2e/PaymentUtils/Paypal.js
+++ b/cypress-tests/cypress/e2e/PaymentUtils/Paypal.js
@@ -45,6 +45,7 @@ export const connectorDetails = {
},
Response: {
status: 200,
+ trigger_skip: true,
body: {
status: "requires_capture",
},
@@ -61,6 +62,7 @@ export const connectorDetails = {
},
Response: {
status: 200,
+ trigger_skip: true,
body: {
status: "succeeded",
},
diff --git a/cypress-tests/cypress/e2e/PaymentUtils/utils.js b/cypress-tests/cypress/e2e/PaymentUtils/utils.js
index a337b0c29f..b0fe4b9d13 100644
--- a/cypress-tests/cypress/e2e/PaymentUtils/utils.js
+++ b/cypress-tests/cypress/e2e/PaymentUtils/utils.js
@@ -77,6 +77,10 @@ export function getValueByKey(jsonObject, key) {
}
export const should_continue_further = (res_data) => {
+ if (res_data.trigger_skip !== undefined) {
+ return !res_data.trigger_skip;
+ }
+
if (
res_data.body.error !== undefined ||
res_data.body.error_code !== undefined ||