mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
chore(cypress): remove logs that expose globalState (#4844)
This commit is contained in:
@ -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);
|
||||
})
|
||||
|
||||
|
||||
@ -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", () => {
|
||||
|
||||
@ -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);
|
||||
})
|
||||
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
@ -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);
|
||||
})
|
||||
|
||||
|
||||
@ -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);
|
||||
})
|
||||
|
||||
|
||||
@ -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", () => {
|
||||
|
||||
@ -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);
|
||||
})
|
||||
|
||||
|
||||
@ -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);
|
||||
})
|
||||
|
||||
|
||||
@ -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);
|
||||
})
|
||||
|
||||
|
||||
@ -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);
|
||||
})
|
||||
|
||||
|
||||
@ -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);
|
||||
})
|
||||
|
||||
|
||||
@ -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));
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@ -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);
|
||||
})
|
||||
|
||||
|
||||
@ -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);
|
||||
})
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user