Skip to content

Commit 26c136b

Browse files
likhinbopannaSayak Bhattacharya
authored andcommitted
ci(cypress): fix fiuu, fiservemea , paybox and worldpay connector (#8209)
1 parent 69c6571 commit 26c136b

File tree

8 files changed

+1009
-1104
lines changed

8 files changed

+1009
-1104
lines changed

cypress-tests/cypress/e2e/configs/Payment/Fiservemea.js

Lines changed: 566 additions & 0 deletions
Large diffs are not rendered by default.

cypress-tests/cypress/e2e/configs/Payment/Fiuu.js

Lines changed: 245 additions & 180 deletions
Large diffs are not rendered by default.

cypress-tests/cypress/e2e/configs/Payment/Paybox.js

Lines changed: 125 additions & 257 deletions
Large diffs are not rendered by default.

cypress-tests/cypress/e2e/configs/Payment/WorldPay.js

Lines changed: 36 additions & 665 deletions
Large diffs are not rendered by default.

cypress-tests/cypress/e2e/spec/Payment/00009-RefundPayment.cy.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,9 @@ describe("Card - Refund flow - No 3DS", () => {
691691
"automatic",
692692
globalState
693693
);
694+
695+
if (shouldContinue)
696+
shouldContinue = utils.should_continue_further(data);
694697
});
695698

696699
it("Confirm No 3DS MIT", () => {
@@ -706,6 +709,9 @@ describe("Card - Refund flow - No 3DS", () => {
706709
"automatic",
707710
globalState
708711
);
712+
713+
if (shouldContinue)
714+
shouldContinue = utils.should_continue_further(data);
709715
});
710716

711717
it("refund-call-test", () => {

cypress-tests/cypress/e2e/spec/Payment/00015-ZeroAuthMandate.cy.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ describe("Card - SingleUse Mandates flow test", () => {
2626
}
2727
});
2828

29+
it("customer-create-call-test", () => {
30+
cy.createCustomerCallTest(fixtures.customerCreateBody, globalState);
31+
});
32+
2933
it("Confirm No 3DS CIT", () => {
3034
const data = getConnectorDetails(globalState.get("connectorId"))[
3135
"card_pm"

cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
2626
}
2727
});
2828

29+
it("customer-create-call-test", () => {
30+
cy.createCustomerCallTest(fixtures.customerCreateBody, globalState);
31+
});
32+
2933
it("Create No 3DS Payment Intent", () => {
3034
const data = getConnectorDetails(globalState.get("connectorId"))[
3135
"card_pm"

cypress-tests/cypress/support/commands.js

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ function validateErrorMessage(response, resData) {
5050
}
5151
}
5252

53+
//skip MIT using PMId if connector does not support MIT only
54+
export function shouldSkipMitUsingPMId(connectorId) {
55+
const skipConnectors = ["fiuu"];
56+
return skipConnectors.includes(connectorId);
57+
}
58+
5359
Cypress.Commands.add("healthCheck", (globalState) => {
5460
const baseUrl = globalState.get("baseUrl");
5561
const url = `${baseUrl}/health`;
@@ -2138,8 +2144,15 @@ Cypress.Commands.add(
21382144
saveCardConfirmBody.payment_token = globalState.get("paymentToken");
21392145
saveCardConfirmBody.profile_id = profile_id;
21402146

2141-
if (reqData.billing === null) {
2142-
saveCardConfirmBody.billing = null;
2147+
// Include request data from config but exclude payment_method_data
2148+
if (reqData) {
2149+
const requestDataWithoutPMD = Object.fromEntries(
2150+
Object.entries(reqData).filter(
2151+
([key]) =>
2152+
key !== "payment_method_data" && key !== "customer_acceptance"
2153+
)
2154+
);
2155+
Object.assign(saveCardConfirmBody, requestDataWithoutPMD);
21432156
}
21442157

21452158
cy.request({
@@ -2577,6 +2590,7 @@ Cypress.Commands.add(
25772590
const merchant_connector_id = globalState.get(
25782591
`${configInfo.merchantConnectorPrefix}Id`
25792592
);
2593+
25802594
for (const key in reqData) {
25812595
requestBody[key] = reqData[key];
25822596
}
@@ -2849,6 +2863,13 @@ Cypress.Commands.add(
28492863
globalState,
28502864
connector_agnostic_mit
28512865
) => {
2866+
if (shouldSkipMitUsingPMId(globalState.get("connectorId"))) {
2867+
cy.log(
2868+
`Skipping mitUsingPMId for connector: ${globalState.get("connectorId")}`
2869+
);
2870+
return;
2871+
}
2872+
28522873
const {
28532874
Configs: configs = {},
28542875
Request: reqData,

0 commit comments

Comments
 (0)