Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cypress): remove unsupported manual confirm tests #5223

Merged
merged 3 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 13 additions & 54 deletions cypress-tests/cypress/e2e/PayoutTest/00003-CardTest.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ describe("[Payout] Cards", () => {
cy.task("setGlobalState", globalState.data);
});

beforeEach(function () {
if (!should_continue) {
this.skip();
}
});

context("Payout Card with Auto Fulfill", () => {
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-payout-call-with-auto-fulfill-test", () => {
let data = utils.getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
Expand Down Expand Up @@ -57,6 +58,12 @@ describe("[Payout] Cards", () => {
context("Payout Card with Manual Fulfill - 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("confirm-payout-call-with-manual-fulfill-test", () => {
let data = utils.getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
Expand Down Expand Up @@ -90,52 +97,4 @@ describe("[Payout] Cards", () => {
cy.retrievePayoutCallTest(globalState);
});
});

context("Payout Card with Manual Fulfill - Create Intent + Confirm", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails

it("create-payout-call", () => {
let data = utils.getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
]["Create"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.createConfirmPayoutTest(
createPayoutBody,
req_data,
res_data,
false,
false,
globalState
);
if (should_continue)
should_continue = utils.should_continue_further(res_data);
});

it("confirm-payout-call", () => {
let data = utils.getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
]["Confirm"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.updatePayoutCallTest({}, req_data, res_data, false, globalState);
if (should_continue)
should_continue = utils.should_continue_further(res_data);
});

it("fulfill-payout-call-test", () => {
let data = utils.getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
]["Fulfill"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.fulfillPayoutCallTest({}, req_data, res_data, globalState);
if (should_continue)
should_continue = utils.should_continue_further(res_data);
});

it("retrieve-payout-call-test", () => {
cy.retrievePayoutCallTest(globalState);
});
});
});
114 changes: 12 additions & 102 deletions cypress-tests/cypress/e2e/PayoutTest/00004-BankTransfer.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ describe("[Payout] [Bank Transfer - SEPA]", () => {
cy.task("setGlobalState", globalState.data);
});

beforeEach(function () {
if (!should_continue) {
this.skip();
}
});

context("[Payout] [Bank transfer - SEPA] Auto Fulfill", () => {
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-payout-call-with-auto-fulfill-test", () => {
let data = utils.getConnectorDetails(globalState.get("connectorId"))[
"bank_transfer_pm"
Expand Down Expand Up @@ -110,120 +110,30 @@ describe("[Payout] [Bank Transfer - SEPA]", () => {
context("[Payout] [Bank transfer - SEPA] Manual Fulfill", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails

it("confirm-payout-call-with-manual-fulfill-test", () => {
let data = utils.getConnectorDetails(globalState.get("connectorId"))[
"bank_transfer_pm"
]["sepa"]["Confirm"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.createConfirmPayoutTest(
createPayoutBody,
req_data,
res_data,
true,
false,
globalState
);
if (should_continue)
should_continue = utils.should_continue_further(res_data);
});

it("fulfill-payout-call-test", () => {
let data = utils.getConnectorDetails(globalState.get("connectorId"))[
"bank_transfer_pm"
]["sepa"]["Fulfill"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.fulfillPayoutCallTest({}, req_data, res_data, globalState);
if (should_continue)
should_continue = utils.should_continue_further(res_data);
});

it("retrieve-payout-call-test", () => {
cy.retrievePayoutCallTest(globalState);
});
});

context("[Payout] [Bank transfer - SEPA] Manual Confirm", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails

it("confirm-payout-call-with-manual-confirm-test", () => {
let data = utils.getConnectorDetails(globalState.get("connectorId"))[
"bank_transfer_pm"
]["sepa"]["Create"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.createConfirmPayoutTest(
createPayoutBody,
req_data,
res_data,
false,
true,
globalState
);
if (should_continue)
should_continue = utils.should_continue_further(res_data);
beforeEach(function () {
if (!should_continue) {
this.skip();
}
});

it("confirm-payout-call", () => {
it("confirm-payout-call-with-manual-fulfill-test", () => {
let data = utils.getConnectorDetails(globalState.get("connectorId"))[
"bank_transfer_pm"
]["sepa"]["Confirm"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.updatePayoutCallTest({}, req_data, res_data, false, globalState);
if (should_continue)
should_continue = utils.should_continue_further(res_data);
});

it("fulfill-payout-call-test", () => {
let data = utils.getConnectorDetails(globalState.get("connectorId"))[
"bank_transfer_pm"
]["sepa"]["Fulfill"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.fulfillPayoutCallTest({}, req_data, res_data, globalState);
if (should_continue)
should_continue = utils.should_continue_further(res_data);
});

it("retrieve-payout-call-test", () => {
cy.retrievePayoutCallTest(globalState);
});
});

context("[Payout] [Bank transfer - SEPA] Manual", () => {
let should_continue = true; // variable that will be used to skip tests if a previous test fails

it("create-payout-call", () => {
let data = utils.getConnectorDetails(globalState.get("connectorId"))[
"bank_transfer_pm"
]["sepa"]["Create"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.createConfirmPayoutTest(
createPayoutBody,
req_data,
res_data,
false,
true,
false,
globalState
);
if (should_continue)
should_continue = utils.should_continue_further(res_data);
});

it("confirm-payout-call", () => {
let data = utils.getConnectorDetails(globalState.get("connectorId"))[
"bank_transfer_pm"
]["sepa"]["Confirm"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.updatePayoutCallTest({}, req_data, res_data, false, globalState);
if (should_continue)
should_continue = utils.should_continue_further(res_data);
});

it("fulfill-payout-call-test", () => {
let data = utils.getConnectorDetails(globalState.get("connectorId"))[
"bank_transfer_pm"
Expand Down
12 changes: 12 additions & 0 deletions cypress-tests/cypress/e2e/PayoutTest/00005-SavePayout.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ describe("[Payout] Saved Card", () => {
() => {
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 customer", () => {
cy.createCustomerCallTest(customerCreateBody, globalState);
});
Expand Down Expand Up @@ -216,6 +222,12 @@ describe("[Payout] Saved Bank transfer", () => {
() => {
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 customer", () => {
cy.createCustomerCallTest(customerCreateBody, globalState);
});
Expand Down
Loading