From d84e62441f39c165af7dc1c8d893344ff85c1711 Mon Sep 17 00:00:00 2001 From: Pa1NarK <69745008+pixincreate@users.noreply.github.com> Date: Mon, 3 Jun 2024 12:06:34 +0530 Subject: [PATCH] chore(cypress): remove logs that expose `globalState` (#4844) --- .../e2e/ConnectorTest/00000-AccountCreate.cy.js | 2 -- .../ConnectorTest/00001-CustomerCreate.cy.js | 2 -- .../ConnectorTest/00002-ConnectorCreate.cy.js | 2 -- .../00003-NoThreeDSAutoCapture.cy.js | 4 ---- .../00004-ThreeDSAutoCapture.cy.js | 6 ------ .../00005-NoThreeDSManualCapture.cy.js | 2 -- .../e2e/ConnectorTest/00006-VoidPayment.cy.js | 2 -- .../e2e/ConnectorTest/00007-SyncPayment.cy.js | 2 -- .../e2e/ConnectorTest/00008-RefundPayment.cy.js | 4 ---- .../e2e/ConnectorTest/00009-SyncRefund.cy.js | 2 -- .../00010-CreateSingleuseMandate.cy.js | 2 -- .../00011-CreateMultiuseMandate.cy.js | 2 -- .../00012-ListAndRevokeMandate.cy.js | 2 -- .../e2e/ConnectorTest/00013-SaveCardFlow.cy.js | 1 - .../ConnectorTest/00014-ZeroAuthMandate.cy.js | 2 -- .../00015-ThreeDSManualCapture.cy.js | 2 -- .../e2e/ConnectorTest/00016-BankTransfers.cy.js | 4 ---- .../e2e/ConnectorTest/00017-BankRedirect.cy.js | 17 ----------------- 18 files changed, 60 deletions(-) diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00000-AccountCreate.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00000-AccountCreate.cy.js index 4c16fef8df41..aed901c29972 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00000-AccountCreate.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00000-AccountCreate.cy.js @@ -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); }) diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00001-CustomerCreate.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00001-CustomerCreate.cy.js index c21152ca896e..5e8bcb5aa14c 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00001-CustomerCreate.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00001-CustomerCreate.cy.js @@ -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", () => { diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00002-ConnectorCreate.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00002-ConnectorCreate.cy.js index 1241048f2862..927f0d020110 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00002-ConnectorCreate.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00002-ConnectorCreate.cy.js @@ -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); }) diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00003-NoThreeDSAutoCapture.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00003-NoThreeDSAutoCapture.cy.js index 4dc3f2a3e78f..ec36fa16023e 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00003-NoThreeDSAutoCapture.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00003-NoThreeDSAutoCapture.cy.js @@ -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); }) @@ -78,7 +76,5 @@ describe("Card - NoThreeDS payment flow test", () => { it("retrieve-payment-call-test", () => { cy.retrievePaymentCallTest(globalState); }); - - }); }); diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00004-ThreeDSAutoCapture.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00004-ThreeDSAutoCapture.cy.js index c970d9716eff..3178170021c5 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00004-ThreeDSAutoCapture.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00004-ThreeDSAutoCapture.cy.js @@ -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)); }) @@ -41,7 +37,6 @@ describe("Card - ThreeDS payment flow test", () => { }); it("payment_methods-call-test", () => { - cy.task('cli_log', "PM CALL "); cy.paymentMethodsCallTest(globalState); }); @@ -49,7 +44,6 @@ describe("Card - ThreeDS payment flow test", () => { 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); }); diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00005-NoThreeDSManualCapture.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00005-NoThreeDSManualCapture.cy.js index 48a22f5a5c03..4ee4483c961a 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00005-NoThreeDSManualCapture.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00005-NoThreeDSManualCapture.cy.js @@ -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); }) diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00006-VoidPayment.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00006-VoidPayment.cy.js index 15f2e0e7930a..ef8157775688 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00006-VoidPayment.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00006-VoidPayment.cy.js @@ -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); }) diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00007-SyncPayment.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00007-SyncPayment.cy.js index 10c16f7ff6e9..1920cdd09dbc 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00007-SyncPayment.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00007-SyncPayment.cy.js @@ -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", () => { diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00008-RefundPayment.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00008-RefundPayment.cy.js index 028e48a41dc8..672c5cf8f4aa 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00008-RefundPayment.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00008-RefundPayment.cy.js @@ -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); }) @@ -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); }) diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00009-SyncRefund.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00009-SyncRefund.cy.js index 31e5e6855d6a..f0cdc9a68903 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00009-SyncRefund.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00009-SyncRefund.cy.js @@ -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); }) diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00010-CreateSingleuseMandate.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00010-CreateSingleuseMandate.cy.js index 4ece0319324e..ec85017f55d3 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00010-CreateSingleuseMandate.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00010-CreateSingleuseMandate.cy.js @@ -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); }) diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00011-CreateMultiuseMandate.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00011-CreateMultiuseMandate.cy.js index 898258c8d6a3..3e14d69db88e 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00011-CreateMultiuseMandate.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00011-CreateMultiuseMandate.cy.js @@ -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); }) diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00012-ListAndRevokeMandate.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00012-ListAndRevokeMandate.cy.js index 8de48fbf95a4..1f9782f22740 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00012-ListAndRevokeMandate.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00012-ListAndRevokeMandate.cy.js @@ -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); }) diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00013-SaveCardFlow.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00013-SaveCardFlow.cy.js index 1168a5690893..828fb5101ac7 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00013-SaveCardFlow.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00013-SaveCardFlow.cy.js @@ -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)); }) }) diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00014-ZeroAuthMandate.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00014-ZeroAuthMandate.cy.js index ee0edcb94ac2..7a0eba4b6ad9 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00014-ZeroAuthMandate.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00014-ZeroAuthMandate.cy.js @@ -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); }) diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00015-ThreeDSManualCapture.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00015-ThreeDSManualCapture.cy.js index 4c3d2a1cd0b5..50d136b59600 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00015-ThreeDSManualCapture.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00015-ThreeDSManualCapture.cy.js @@ -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); }) diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00016-BankTransfers.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00016-BankTransfers.cy.js index ae5f09871024..da4fab34b8e5 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00016-BankTransfers.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00016-BankTransfers.cy.js @@ -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); }); @@ -46,7 +44,6 @@ describe("Bank Transfers", () => { }); it("payment_methods-call-test", () => { - cy.task("cli_log", "PM CALL "); cy.paymentMethodsCallTest(globalState); }); @@ -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, diff --git a/cypress-tests/cypress/e2e/ConnectorTest/00017-BankRedirect.cy.js b/cypress-tests/cypress/e2e/ConnectorTest/00017-BankRedirect.cy.js index c08468022a80..3a636b2020a0 100644 --- a/cypress-tests/cypress/e2e/ConnectorTest/00017-BankRedirect.cy.js +++ b/cypress-tests/cypress/e2e/ConnectorTest/00017-BankRedirect.cy.js @@ -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", () => { @@ -55,7 +48,6 @@ describe("Bank Redirect tests", () => { }); it("payment_methods-call-test", () => { - cy.task("cli_log", "PM CALL "); cy.paymentMethodsCallTest(globalState); }); @@ -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, @@ -105,7 +96,6 @@ describe("Bank Redirect tests", () => { }); it("payment_methods-call-test", () => { - cy.task("cli_log", "PM CALL "); cy.paymentMethodsCallTest(globalState); }); @@ -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, @@ -167,7 +156,6 @@ describe("Bank Redirect tests", () => { }); it("payment_methods-call-test", () => { - cy.task("cli_log", "PM CALL "); cy.paymentMethodsCallTest(globalState); }); @@ -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, @@ -228,7 +215,6 @@ describe("Bank Redirect tests", () => { }); it("payment_methods-call-test", () => { - cy.task("cli_log", "PM CALL "); cy.paymentMethodsCallTest(globalState); }); @@ -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, @@ -289,7 +274,6 @@ describe("Bank Redirect tests", () => { }); it("payment_methods-call-test", () => { - cy.task("cli_log", "PM CALL "); cy.paymentMethodsCallTest(globalState); }); @@ -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,