mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
fix(cypress): address cypress skipping tests (#5046)
This commit is contained in:
1
cypress-tests/.gitignore
vendored
1
cypress-tests/.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
creds.json
|
||||
screenshots
|
||||
run_all.sh
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
beforeEach(function () {
|
||||
if (!should_continue) {
|
||||
this.skip();
|
||||
}
|
||||
});
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
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"][
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
beforeEach(function () {
|
||||
if (!should_continue) {
|
||||
this.skip();
|
||||
}
|
||||
});
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
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"))[
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
beforeEach(function () {
|
||||
if (!should_continue) {
|
||||
this.skip();
|
||||
}
|
||||
});
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
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"
|
||||
|
||||
@ -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"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -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"
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
beforeEach(function () {
|
||||
if (!should_continue) {
|
||||
this.skip();
|
||||
}
|
||||
});
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
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"))[
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
beforeEach(function () {
|
||||
if (!should_continue) {
|
||||
this.skip();
|
||||
}
|
||||
});
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
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"))[
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
beforeEach(function () {
|
||||
if (!should_continue) {
|
||||
this.skip();
|
||||
}
|
||||
});
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
it("Confirm No 3DS CIT", () => {
|
||||
console.log("confirm -> " + globalState.get("connectorId"));
|
||||
let data = getConnectorDetails(globalState.get("connectorId"))[
|
||||
|
||||
@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
beforeEach(function () {
|
||||
if (!should_continue) {
|
||||
this.skip();
|
||||
}
|
||||
});
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
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);
|
||||
});
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
beforeEach(function () {
|
||||
if (!should_continue) {
|
||||
this.skip();
|
||||
}
|
||||
});
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
it("Confirm No 3DS CIT", () => {
|
||||
let data = getConnectorDetails(globalState.get("connectorId"))[
|
||||
"card_pm"
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
beforeEach(function () {
|
||||
if (!should_continue) {
|
||||
this.skip();
|
||||
}
|
||||
});
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
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"
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
beforeEach(function () {
|
||||
if (!should_continue) {
|
||||
this.skip();
|
||||
}
|
||||
});
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
it("create-payment-call-test", () => {
|
||||
let data = getConnectorDetails(globalState.get("connectorId"))[
|
||||
"bank_transfer_pm"
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
beforeEach(function () {
|
||||
if (!should_continue) {
|
||||
this.skip();
|
||||
}
|
||||
});
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
|
||||
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"
|
||||
|
||||
@ -32,7 +32,7 @@ describe("[Payout] Saved Card", () => {
|
||||
|
||||
context("[Payout] [Card] Onboard customer prior to transaction", () => {
|
||||
let should_continue = true; // variable that will be used to skip tests if a previous test fails
|
||||
|
||||
|
||||
// This is needed to get customer payment methods
|
||||
beforeEach("seed global state", () => {
|
||||
createPayoutBody = Cypress._.cloneDeep(initialCreatePayoutBody);
|
||||
|
||||
Reference in New Issue
Block a user