Skip to content

Commit

Permalink
chore(cypress): remove logs that expose globalState (#4844)
Browse files Browse the repository at this point in the history
  • Loading branch information
pixincreate authored Jun 3, 2024
1 parent df7cf96 commit d84e624
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ describe("Account Create flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})
})
after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task('setGlobalState', globalState.data);
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ describe("Customer Create flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})
})
after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task('setGlobalState', globalState.data);
})
it("customer-create-call-test", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ describe("Connector Account Create flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})
})

after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task('setGlobalState', globalState.data);
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ describe("Card - NoThreeDS payment flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})
})

after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task('setGlobalState', globalState.data);
})

Expand Down Expand Up @@ -78,7 +76,5 @@ describe("Card - NoThreeDS payment flow test", () => {
it("retrieve-payment-call-test", () => {
cy.retrievePaymentCallTest(globalState);
});


});
});
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,12 @@ describe("Card - ThreeDS payment flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
cy.task('cli_log', "SEEDING GLOBAL STATE -> " + JSON.stringify(globalState));
})

})

afterEach("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task('setGlobalState', globalState.data);
cy.task('cli_log', " FLUSHING GLOBAL STATE -> " + JSON.stringify(globalState));
})


Expand All @@ -41,15 +37,13 @@ describe("Card - ThreeDS payment flow test", () => {
});

it("payment_methods-call-test", () => {
cy.task('cli_log', "PM CALL ");
cy.paymentMethodsCallTest(globalState);
});

it("Confirm 3DS", () => {
let data = getConnectorDetails(globalState.get("connectorId"))["card_pm"]["3DSAutoCapture"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.task('cli_log', "GLOBAL STATE -> " + JSON.stringify(globalState.data));
cy.confirmCallTest(confirmBody, req_data, res_data, true, globalState);
if(should_continue) should_continue = utils.should_continue_further(res_data);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ describe("Card - NoThreeDS Manual payment flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})
})

after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task('setGlobalState', globalState.data);
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ describe("Card - NoThreeDS Manual payment flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})
})

after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task('setGlobalState', globalState.data);
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ describe("Card - Sync payment flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})
})

after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task('setGlobalState', globalState.data);
})
it("create-payment-call-test", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ describe("Card - Refund flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})

})

afterEach("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task('setGlobalState', globalState.data);
})

Expand Down Expand Up @@ -534,13 +532,11 @@ describe("Card - Refund flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})

})

afterEach("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task('setGlobalState', globalState.data);
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ describe("Card - Sync Refund flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})
})

after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task('setGlobalState', globalState.data);
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ describe("Card - SingleUse Mandates flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})
})

after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task('setGlobalState', globalState.data);
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ describe("Card - MultiUse Mandates flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})
})

after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task('setGlobalState', globalState.data);
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ describe("Card - SingleUse Mandates flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})
})

after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task('setGlobalState', globalState.data);
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ describe("Card - SaveCard payment flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ describe("Card - SingleUse Mandates flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})
})

after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task('setGlobalState', globalState.data);
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,11 @@ describe("Card - ThreeDS Manual payment flow test", () => {

cy.task('getGlobalState').then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
})

})

afterEach("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task('setGlobalState', globalState.data);
})

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ describe("Bank Transfers", () => {
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
});
});

after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task("setGlobalState", globalState.data);
});

Expand Down Expand Up @@ -46,7 +44,6 @@ describe("Bank Transfers", () => {
});

it("payment_methods-call-test", () => {
cy.task("cli_log", "PM CALL ");
cy.paymentMethodsCallTest(globalState);
});

Expand All @@ -56,7 +53,6 @@ describe("Bank Transfers", () => {
]["Pix"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.task("cli_log", "GLOBAL STATE -> " + JSON.stringify(globalState.data));
cy.confirmBankTransferCallTest(
confirmBody,
req_data,
Expand Down
17 changes: 0 additions & 17 deletions cypress-tests/cypress/e2e/ConnectorTest/00017-BankRedirect.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,15 @@ describe("Bank Redirect tests", () => {
before("seed global state", () => {
cy.task("getGlobalState").then((state) => {
globalState = new State(state);
console.log("seeding globalState -> " + JSON.stringify(globalState));
});
});

after("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task("setGlobalState", globalState.data);
});

afterEach("flush global state", () => {
console.log("flushing globalState -> " + JSON.stringify(globalState));
cy.task("setGlobalState", globalState.data);
cy.task(
"cli_log",
" FLUSHING GLOBAL STATE -> " + JSON.stringify(globalState)
);
});

context("Blik Create and Confirm flow test", () => {
Expand Down Expand Up @@ -55,7 +48,6 @@ describe("Bank Redirect tests", () => {
});

it("payment_methods-call-test", () => {
cy.task("cli_log", "PM CALL ");
cy.paymentMethodsCallTest(globalState);
});

Expand All @@ -65,7 +57,6 @@ describe("Bank Redirect tests", () => {
]["blik"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.task("cli_log", "GLOBAL STATE -> " + JSON.stringify(globalState.data));
cy.confirmBankRedirectCallTest(
confirmBody,
req_data,
Expand Down Expand Up @@ -105,7 +96,6 @@ describe("Bank Redirect tests", () => {
});

it("payment_methods-call-test", () => {
cy.task("cli_log", "PM CALL ");
cy.paymentMethodsCallTest(globalState);
});

Expand All @@ -115,7 +105,6 @@ describe("Bank Redirect tests", () => {
]["eps"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.task("cli_log", "GLOBAL STATE -> " + JSON.stringify(globalState.data));
cy.confirmBankRedirectCallTest(
confirmBody,
req_data,
Expand Down Expand Up @@ -167,7 +156,6 @@ describe("Bank Redirect tests", () => {
});

it("payment_methods-call-test", () => {
cy.task("cli_log", "PM CALL ");
cy.paymentMethodsCallTest(globalState);
});

Expand All @@ -177,7 +165,6 @@ describe("Bank Redirect tests", () => {
]["ideal"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.task("cli_log", "GLOBAL STATE -> " + JSON.stringify(globalState.data));
cy.confirmBankRedirectCallTest(
confirmBody,
req_data,
Expand Down Expand Up @@ -228,7 +215,6 @@ describe("Bank Redirect tests", () => {
});

it("payment_methods-call-test", () => {
cy.task("cli_log", "PM CALL ");
cy.paymentMethodsCallTest(globalState);
});

Expand All @@ -238,7 +224,6 @@ describe("Bank Redirect tests", () => {
]["giropay"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.task("cli_log", "GLOBAL STATE -> " + JSON.stringify(globalState.data));
cy.confirmBankRedirectCallTest(
confirmBody,
req_data,
Expand Down Expand Up @@ -289,7 +274,6 @@ describe("Bank Redirect tests", () => {
});

it("payment_methods-call-test", () => {
cy.task("cli_log", "PM CALL ");
cy.paymentMethodsCallTest(globalState);
});

Expand All @@ -299,7 +283,6 @@ describe("Bank Redirect tests", () => {
]["sofort"];
let req_data = data["Request"];
let res_data = data["Response"];
cy.task("cli_log", "GLOBAL STATE -> " + JSON.stringify(globalState.data));
cy.confirmBankRedirectCallTest(
confirmBody,
req_data,
Expand Down

0 comments on commit d84e624

Please sign in to comment.