fix(cypress): address cypress skipping tests (#5046)

This commit is contained in:
Pa1NarK
2024-06-20 15:27:25 +05:30
committed by GitHub
parent 45a908b440
commit 973ecbf84e
17 changed files with 903 additions and 593 deletions

View File

@ -1,2 +1,3 @@
creds.json
screenshots
run_all.sh

View File

@ -2,13 +2,12 @@ import confirmBody from "../../fixtures/confirm-body.json";
import createConfirmPaymentBody from "../../fixtures/create-confirm-body.json";
import createPaymentBody from "../../fixtures/create-payment-body.json";
import State from "../../utils/State";
import getConnectorDetails, * as utils from "../PaymentUtils/utils";
import getConnectorDetails from "../PaymentUtils/utils";
import * as utils from "../PaymentUtils/utils";
let globalState;
describe("Card - NoThreeDS payment flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
@ -19,12 +18,15 @@ describe("Card - NoThreeDS payment flow test", () => {
cy.task("setGlobalState", globalState.data);
});
context("Card-NoThreeDS payment flow test Create and confirm", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context("Card-NoThreeDS payment flow test Create and confirm", () => {
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PaymentIntent"
@ -64,6 +66,14 @@ describe("Card - NoThreeDS payment flow test", () => {
});
context("Card-NoThreeDS payment flow test Create+Confirm", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create+confirm-payment-call-test", () => {
console.log("confirm -> " + globalState.get("connectorId"));
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][

View File

@ -1,25 +1,26 @@
import confirmBody from "../../fixtures/confirm-body.json";
import createPaymentBody from "../../fixtures/create-payment-body.json";
import State from "../../utils/State";
import getConnectorDetails, * as utils from "../PaymentUtils/utils";
import getConnectorDetails from "../PaymentUtils/utils";
import * as utils from "../PaymentUtils/utils";
let globalState;
describe("Card - ThreeDS payment flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
});
});
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
});
});
afterEach("flush global state", () => {
cy.task("setGlobalState", globalState.data);
});

View File

@ -3,13 +3,12 @@ import confirmBody from "../../fixtures/confirm-body.json";
import createConfirmPaymentBody from "../../fixtures/create-confirm-body.json";
import createPaymentBody from "../../fixtures/create-payment-body.json";
import State from "../../utils/State";
import getConnectorDetails, * as utils from "../PaymentUtils/utils";
import getConnectorDetails from "../PaymentUtils/utils";
import * as utils from "../PaymentUtils/utils";
let globalState;
describe("Card - NoThreeDS Manual payment flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
@ -20,14 +19,16 @@ describe("Card - NoThreeDS Manual payment flow test", () => {
cy.task("setGlobalState", globalState.data);
});
context("Card - NoThreeDS Manual Full Capture payment flow test", () => {
context("payment Create and Confirm", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context("Card - NoThreeDS Manual Full Capture payment flow test", () => {
context("payment Create and Confirm", () => {
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
@ -85,6 +86,14 @@ describe("Card - NoThreeDS Manual payment flow test", () => {
});
context("Payment Create+Confirm", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create+confirm-payment-call-test", () => {
console.log("confirm -> " + globalState.get("connectorId"));
let data = getConnectorDetails(globalState.get("connectorId"))[
@ -131,6 +140,14 @@ describe("Card - NoThreeDS Manual payment flow test", () => {
"Card - NoThreeDS Manual Partial Capture payment flow test - Create and Confirm",
() => {
context("payment Create and Payment Confirm", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
@ -193,6 +210,14 @@ describe("Card - NoThreeDS Manual payment flow test", () => {
});
context("payment + Confirm", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create+confirm-payment-call-test", () => {
console.log("confirm -> " + globalState.get("connectorId"));
let data = getConnectorDetails(globalState.get("connectorId"))[

View File

@ -2,13 +2,12 @@ import confirmBody from "../../fixtures/confirm-body.json";
import createPaymentBody from "../../fixtures/create-payment-body.json";
import voidBody from "../../fixtures/void-payment-body.json";
import State from "../../utils/State";
import getConnectorDetails, * as utils from "../PaymentUtils/utils";
import getConnectorDetails from "../PaymentUtils/utils";
import * as utils from "../PaymentUtils/utils";
let globalState;
describe("Card - NoThreeDS Manual payment flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
@ -19,13 +18,15 @@ describe("Card - NoThreeDS Manual payment flow test", () => {
cy.task("setGlobalState", globalState.data);
});
context("Card - void payment in Requires_capture state flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context("Card - void payment in Requires_capture state flow test", () => {
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PaymentIntent"
@ -76,6 +77,14 @@ describe("Card - NoThreeDS Manual payment flow test", () => {
context(
"Card - void payment in Requires_payment_method state flow test",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
@ -114,6 +123,14 @@ describe("Card - NoThreeDS Manual payment flow test", () => {
context(
"Card - void payment in Requires_payment_method state flow test",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"

View File

@ -1,13 +1,20 @@
import confirmBody from "../../fixtures/confirm-body.json";
import createPaymentBody from "../../fixtures/create-payment-body.json";
import State from "../../utils/State";
import getConnectorDetails, * as utils from "../PaymentUtils/utils";
import getConnectorDetails from "../PaymentUtils/utils";
import * as utils from "../PaymentUtils/utils";
let globalState;
describe("Card - Sync payment flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
@ -17,13 +24,6 @@ describe("Card - Sync payment flow test", () => {
after("flush global state", () => {
cy.task("setGlobalState", globalState.data);
});
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PaymentIntent"

View File

@ -4,16 +4,15 @@ import createConfirmPaymentBody from "../../fixtures/create-confirm-body.json";
import citConfirmBody from "../../fixtures/create-mandate-cit.json";
import mitConfirmBody from "../../fixtures/create-mandate-mit.json";
import createPaymentBody from "../../fixtures/create-payment-body.json";
import listRefundCall from "../../fixtures/list-refund-call-body.json";
import refundBody from "../../fixtures/refund-flow-body.json";
import listRefundCall from "../../fixtures/list-refund-call-body.json";
import State from "../../utils/State";
import getConnectorDetails, * as utils from "../PaymentUtils/utils";
import getConnectorDetails from "../PaymentUtils/utils";
import * as utils from "../PaymentUtils/utils";
let globalState;
describe("Card - Refund flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
@ -24,13 +23,15 @@ describe("Card - Refund flow test", () => {
cy.task("setGlobalState", globalState.data);
});
context("Card - Full Refund flow test for No-3DS", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context("Card - Full Refund flow test for No-3DS", () => {
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PaymentIntent"
@ -83,6 +84,14 @@ describe("Card - Refund flow test", () => {
});
context("Card - Partial Refund flow test for No-3DS", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PaymentIntent"
@ -148,6 +157,14 @@ describe("Card - Refund flow test", () => {
context(
"Fully Refund Card-NoThreeDS payment flow test Create+Confirm",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create+confirm-payment-call-test", () => {
console.log("confirm -> " + globalState.get("connectorId"));
let data = getConnectorDetails(globalState.get("connectorId"))[
@ -187,6 +204,14 @@ describe("Card - Refund flow test", () => {
context(
"Partially Refund Card-NoThreeDS payment flow test Create+Confirm",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create+confirm-payment-call-test", () => {
console.log("confirm -> " + globalState.get("connectorId"));
let data = getConnectorDetails(globalState.get("connectorId"))[
@ -246,6 +271,14 @@ describe("Card - Refund flow test", () => {
);
context("Card - Full Refund for fully captured No-3DS payment", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PaymentIntent"
@ -325,6 +358,14 @@ describe("Card - Refund flow test", () => {
});
context("Card - Partial Refund for fully captured No-3DS payment", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PaymentIntent"
@ -417,6 +458,14 @@ describe("Card - Refund flow test", () => {
});
context("Card - Full Refund for partially captured No-3DS payment", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PaymentIntent"
@ -496,6 +545,14 @@ describe("Card - Refund flow test", () => {
});
context("Card - partial Refund for partially captured No-3DS payment", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PaymentIntent"
@ -577,6 +634,14 @@ describe("Card - Refund flow test", () => {
context(
"Card - Full Refund for Create + Confirm Automatic CIT and MIT payment flow test",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("Confirm No 3DS CIT", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
@ -641,8 +706,27 @@ describe("Card - Refund flow test", () => {
});
}
);
});
context("Card - Full Refund flow test for 3DS", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
});
});
afterEach("flush global state", () => {
cy.task("setGlobalState", globalState.data);
});
context("Card - Full Refund flow test for 3DS", () => {
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PaymentIntent"
@ -695,9 +779,17 @@ describe("Card - Refund flow test", () => {
if (should_continue)
should_continue = utils.should_continue_further(res_data);
});
});
context("Card - Partial Refund flow test for 3DS", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context("Card - Partial Refund flow test for 3DS", () => {
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PaymentIntent"
@ -762,9 +854,17 @@ describe("Card - Refund flow test", () => {
if (should_continue)
should_continue = utils.should_continue_further(res_data);
});
});
context("Fully Refund Card-ThreeDS payment flow test Create+Confirm", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context("Fully Refund Card-ThreeDS payment flow test Create+Confirm", () => {
it("create+confirm-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"3DSAutoCapture"
@ -802,15 +902,23 @@ describe("Card - Refund flow test", () => {
if (should_continue)
should_continue = utils.should_continue_further(res_data);
});
});
});
context(
context(
"Partially Refund Card-ThreeDS payment flow test Create+Confirm",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create+confirm-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
]["3DSAutoCapture"];
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"3DSAutoCapture"
];
let req_data = data["Request"];
let res_data = data["Response"];
cy.createConfirmPaymentTest(
@ -835,9 +943,9 @@ describe("Card - Refund flow test", () => {
});
it("refund-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
]["PartialRefund"];
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PartialRefund"
];
let req_data = data["Request"];
let res_data = data["Response"];
cy.refundCallTest(refundBody, req_data, res_data, 3000, globalState);
@ -846,9 +954,9 @@ describe("Card - Refund flow test", () => {
});
it("refund-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
]["PartialRefund"];
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PartialRefund"
];
let req_data = data["Request"];
let res_data = data["Response"];
cy.refundCallTest(refundBody, req_data, res_data, 3000, globalState);
@ -857,9 +965,9 @@ describe("Card - Refund flow test", () => {
});
it("sync-refund-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
]["SyncRefund"];
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"SyncRefund"
];
let req_data = data["Request"];
let res_data = data["Response"];
cy.syncRefundCallTest(req_data, res_data, globalState);
@ -867,9 +975,17 @@ describe("Card - Refund flow test", () => {
should_continue = utils.should_continue_further(res_data);
});
}
);
);
context("Card - Full Refund for fully captured 3DS payment", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context("Card - Full Refund for fully captured 3DS payment", () => {
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PaymentIntent"
@ -938,9 +1054,17 @@ describe("Card - Refund flow test", () => {
if (should_continue)
should_continue = utils.should_continue_further(res_data);
});
});
context("Card - Partial Refund for fully captured 3DS payment", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context("Card - Partial Refund for fully captured 3DS payment", () => {
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PaymentIntent"
@ -1019,9 +1143,17 @@ describe("Card - Refund flow test", () => {
if (should_continue)
should_continue = utils.should_continue_further(res_data);
});
});
context("Card - Full Refund for partially captured 3DS payment", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context("Card - Full Refund for partially captured 3DS payment", () => {
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PaymentIntent"
@ -1090,9 +1222,17 @@ describe("Card - Refund flow test", () => {
if (should_continue)
should_continue = utils.should_continue_further(res_data);
});
});
context("Card - partial Refund for partially captured 3DS payment", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context("Card - partial Refund for partially captured 3DS payment", () => {
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PaymentIntent"
@ -1161,5 +1301,4 @@ describe("Card - Refund flow test", () => {
if (should_continue)
should_continue = utils.should_continue_further(res_data);
});
});
});

View File

@ -2,13 +2,20 @@ import confirmBody from "../../fixtures/confirm-body.json";
import createPaymentBody from "../../fixtures/create-payment-body.json";
import refundBody from "../../fixtures/refund-flow-body.json";
import State from "../../utils/State";
import getConnectorDetails, * as utils from "../PaymentUtils/utils";
import getConnectorDetails from "../PaymentUtils/utils";
import * as utils from "../PaymentUtils/utils";
let globalState;
describe("Card - Sync Refund flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
@ -19,12 +26,6 @@ describe("Card - Sync Refund flow test", () => {
cy.task("setGlobalState", globalState.data);
});
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"][
"PaymentIntent"

View File

@ -2,13 +2,12 @@ import captureBody from "../../fixtures/capture-flow-body.json";
import citConfirmBody from "../../fixtures/create-mandate-cit.json";
import mitConfirmBody from "../../fixtures/create-mandate-mit.json";
import State from "../../utils/State";
import getConnectorDetails, * as utils from "../PaymentUtils/utils";
import getConnectorDetails from "../PaymentUtils/utils";
import * as utils from "../PaymentUtils/utils";
let globalState;
describe("Card - SingleUse Mandates flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
@ -19,15 +18,17 @@ describe("Card - SingleUse Mandates flow test", () => {
cy.task("setGlobalState", globalState.data);
});
context(
"Card - NoThreeDS Create + Confirm Automatic CIT and MIT payment flow test",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context(
"Card - NoThreeDS Create + Confirm Automatic CIT and MIT payment flow test",
() => {
it("Confirm No 3DS CIT", () => {
console.log("confirm -> " + globalState.get("connectorId"));
let data = getConnectorDetails(globalState.get("connectorId"))[
@ -65,6 +66,14 @@ describe("Card - SingleUse Mandates flow test", () => {
context(
"Card - NoThreeDS 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
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("Confirm No 3DS CIT", () => {
console.log("confirm -> " + globalState.get("connectorId"));
let data = getConnectorDetails(globalState.get("connectorId"))[
@ -130,6 +139,14 @@ describe("Card - SingleUse Mandates flow test", () => {
context(
"Card - 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
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("Create No 3DS CIT", () => {
console.log("confirm -> " + globalState.get("connectorId"));
let data = getConnectorDetails(globalState.get("connectorId"))[

View File

@ -2,13 +2,12 @@ import captureBody from "../../fixtures/capture-flow-body.json";
import citConfirmBody from "../../fixtures/create-mandate-cit.json";
import mitConfirmBody from "../../fixtures/create-mandate-mit.json";
import State from "../../utils/State";
import getConnectorDetails, * as utils from "../PaymentUtils/utils";
import getConnectorDetails from "../PaymentUtils/utils";
import * as utils from "../PaymentUtils/utils";
let globalState;
describe("Card - MultiUse Mandates flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
@ -19,15 +18,17 @@ describe("Card - MultiUse Mandates flow test", () => {
cy.task("setGlobalState", globalState.data);
});
context(
"Card - NoThreeDS Create + Confirm Automatic CIT and MIT payment flow test",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context(
"Card - NoThreeDS Create + Confirm Automatic CIT and MIT payment flow test",
() => {
it("Confirm No 3DS CIT", () => {
console.log("confirm -> " + globalState.get("connectorId"));
let data = getConnectorDetails(globalState.get("connectorId"))[
@ -74,6 +75,14 @@ describe("Card - MultiUse Mandates flow test", () => {
context(
"Card - NoThreeDS 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
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("Confirm No 3DS CIT", () => {
console.log("confirm -> " + globalState.get("connectorId"));
let data = getConnectorDetails(globalState.get("connectorId"))[
@ -157,6 +166,14 @@ describe("Card - MultiUse Mandates flow test", () => {
context(
"Card - 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
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("Confirm No 3DS CIT", () => {
console.log("confirm -> " + globalState.get("connectorId"));
let data = getConnectorDetails(globalState.get("connectorId"))[

View File

@ -1,14 +1,13 @@
import citConfirmBody from "../../fixtures/create-mandate-cit.json";
import mitConfirmBody from "../../fixtures/create-mandate-mit.json";
import getConnectorDetails, * as utils from "../PaymentUtils/utils";
import getConnectorDetails from "../PaymentUtils/utils";
import * as utils from "../PaymentUtils/utils";
import State from "../../utils/State";
let globalState;
describe("Card - SingleUse Mandates flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
@ -19,15 +18,17 @@ describe("Card - SingleUse Mandates flow test", () => {
cy.task("setGlobalState", globalState.data);
});
context(
"Card - NoThreeDS Create + Confirm Automatic CIT and MIT payment flow test",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context(
"Card - NoThreeDS Create + Confirm Automatic CIT and MIT payment flow test",
() => {
it("Confirm No 3DS CIT", () => {
console.log("confirm -> " + globalState.get("connectorId"));
let data = getConnectorDetails(globalState.get("connectorId"))[

View File

@ -1,30 +1,32 @@
import captureBody from "../../fixtures/capture-flow-body.json";
import confirmBody from "../../fixtures/confirm-body.json";
import createPaymentBody from "../../fixtures/create-payment-body.json";
import createConfirmPaymentBody from "../../fixtures/create-confirm-body.json";
import customerCreateBody from "../../fixtures/create-customer-body.json";
import createPaymentBody from "../../fixtures/create-payment-body.json";
import SaveCardConfirmBody from "../../fixtures/save-card-confirm-body.json";
import getConnectorDetails from "../PaymentUtils/utils";
import * as utils from "../PaymentUtils/utils";
import State from "../../utils/State";
import getConnectorDetails, * as utils from "../PaymentUtils/utils";
let globalState;
describe("Card - SaveCard payment flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
});
});
context(
"Save card for NoThreeDS automatic capture payment- Create+Confirm",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context(
"Save card for NoThreeDS automatic capture payment- Create+Confirm",
() => {
it("customer-create-call-test", () => {
cy.createCustomerCallTest(customerCreateBody, globalState);
});
@ -94,6 +96,14 @@ describe("Card - SaveCard payment flow test", () => {
context(
"Save card for NoThreeDS manual full capture payment- Create+Confirm",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("customer-create-call-test", () => {
cy.createCustomerCallTest(customerCreateBody, globalState);
});
@ -178,6 +188,14 @@ describe("Card - SaveCard payment flow test", () => {
context(
"Save card for NoThreeDS manual partial capture payment- Create + Confirm",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("customer-create-call-test", () => {
cy.createCustomerCallTest(customerCreateBody, globalState);
});

View File

@ -1,13 +1,12 @@
import citConfirmBody from "../../fixtures/create-mandate-cit.json";
import mitConfirmBody from "../../fixtures/create-mandate-mit.json";
import State from "../../utils/State";
import getConnectorDetails, * as utils from "../PaymentUtils/utils";
import getConnectorDetails from "../PaymentUtils/utils";
import * as utils from "../PaymentUtils/utils";
let globalState;
describe("Card - SingleUse Mandates flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
@ -18,15 +17,17 @@ describe("Card - SingleUse Mandates flow test", () => {
cy.task("setGlobalState", globalState.data);
});
context(
"Card - NoThreeDS Create + Confirm Automatic CIT and Single use MIT payment flow test",
() => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context(
"Card - NoThreeDS Create + Confirm Automatic CIT and Single use MIT payment flow test",
() => {
it("Confirm No 3DS CIT", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"

View File

@ -1,15 +1,14 @@
import captureBody from "../../fixtures/capture-flow-body.json";
import confirmBody from "../../fixtures/confirm-body.json";
import createConfirmPaymentBody from "../../fixtures/create-confirm-body.json";
import createPaymentBody from "../../fixtures/create-payment-body.json";
import createConfirmPaymentBody from "../../fixtures/create-confirm-body.json";
import confirmBody from "../../fixtures/confirm-body.json";
import getConnectorDetails from "../PaymentUtils/utils";
import State from "../../utils/State";
import getConnectorDetails, * as utils from "../PaymentUtils/utils";
import captureBody from "../../fixtures/capture-flow-body.json";
import * as utils from "../PaymentUtils/utils";
let globalState;
describe("Card - ThreeDS Manual payment flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
@ -20,13 +19,16 @@ describe("Card - ThreeDS Manual payment flow test", () => {
cy.task("setGlobalState", globalState.data);
});
context("Card - ThreeDS Manual Full Capture payment flow test", () => {
context("payment Create and Confirm", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context("Card - ThreeDS Manual Full Capture payment flow test", () => {
context("payment Create and Confirm", () => {
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
@ -86,6 +88,14 @@ describe("Card - ThreeDS Manual payment flow test", () => {
});
context("Payment Create+Confirm", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create+confirm-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
@ -134,6 +144,14 @@ describe("Card - ThreeDS Manual payment flow test", () => {
"Card - ThreeDS Manual Partial Capture payment flow test - Create and Confirm",
() => {
context("payment Create and Payment Confirm", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
@ -199,6 +217,14 @@ describe("Card - ThreeDS Manual payment flow test", () => {
});
context("payment + Confirm", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create+confirm-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"

View File

@ -6,8 +6,6 @@ import getConnectorDetails, * as utils from "../PaymentUtils/utils";
let globalState;
describe("Bank Transfers", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
@ -18,13 +16,15 @@ describe("Bank Transfers", () => {
cy.task("setGlobalState", globalState.data);
});
context("Bank transfer - Pix forward flow", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
context("Bank transfer - Pix forward flow", () => {
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"bank_transfer_pm"

View File

@ -6,8 +6,6 @@ import getConnectorDetails, * as utils from "../PaymentUtils/utils";
let globalState;
describe("Bank Redirect tests", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
@ -18,17 +16,19 @@ describe("Bank Redirect tests", () => {
cy.task("setGlobalState", globalState.data);
});
afterEach("flush global state", () => {
cy.task("setGlobalState", globalState.data);
});
context("Blik Create and Confirm flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
afterEach("flush global state", () => {
cy.task("setGlobalState", globalState.data);
});
context("Blik Create and Confirm flow test", () => {
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"bank_redirect_pm"
@ -70,6 +70,13 @@ describe("Bank Redirect tests", () => {
});
context("EPS Create and Confirm flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"bank_redirect_pm"
@ -122,6 +129,14 @@ describe("Bank Redirect tests", () => {
});
context("iDEAL Create and Confirm flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"bank_redirect_pm"
@ -174,6 +189,13 @@ describe("Bank Redirect tests", () => {
});
context("Giropay Create and Confirm flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"bank_redirect_pm"
@ -226,6 +248,13 @@ describe("Bank Redirect tests", () => {
});
context("Sofort Create and Confirm flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"bank_redirect_pm"
@ -278,6 +307,13 @@ describe("Bank Redirect tests", () => {
});
context("Przelewy24 Create and Confirm flow test", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});
it("create-payment-call-test", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"bank_redirect_pm"