From cd0a34c84e0c642c6963d5eec7219535f21fc0ca Mon Sep 17 00:00:00 2001 From: PiX <69745008+pixincreate@users.noreply.github.com> Date: Mon, 2 Dec 2024 20:37:00 +0530 Subject: [PATCH] Revert "refactor: do not hard code configs" This reverts commit 490911c64b71ba030693dfad01f268b858ed1063. --- .../PaymentTest/00026-IncrementalAuth.cy.js | 22 ++++++++++++++++--- .../cypress/e2e/PaymentUtils/Cybersource.js | 9 +------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/cypress-tests/cypress/e2e/PaymentTest/00026-IncrementalAuth.cy.js b/cypress-tests/cypress/e2e/PaymentTest/00026-IncrementalAuth.cy.js index e281fc0a2f7..f96c8dad2e2 100644 --- a/cypress-tests/cypress/e2e/PaymentTest/00026-IncrementalAuth.cy.js +++ b/cypress-tests/cypress/e2e/PaymentTest/00026-IncrementalAuth.cy.js @@ -33,6 +33,7 @@ describe.skip("[Payment] Incremental Auth", () => { const newData = { ...data, + Configs: { CONNECTOR_CREDENTIAL: { value: "connector_2" } }, Request: { ...data.Request, request_incremental_authorization: true, @@ -54,7 +55,12 @@ describe.skip("[Payment] Incremental Auth", () => { "card_pm" ]["SaveCardUseNo3DSManualCaptureOffSession"]; - cy.confirmCallTest(fixtures.confirmBody, data, true, globalState); + const newData = { + ...data, + Configs: { CONNECTOR_CREDENTIAL: { value: "connector_2" } }, + }; + + cy.confirmCallTest(fixtures.confirmBody, newData, true, globalState); if (shouldContinue) shouldContinue = utils.should_continue_further(data); }); @@ -94,9 +100,14 @@ describe.skip("[Payment] Incremental Auth", () => { "card_pm" ]["PaymentIntentOffSession"]; + const newData = { + ...data, + Configs: { CONNECTOR_CREDENTIAL: { value: "connector_2" } }, + }; + cy.createPaymentIntentTest( fixtures.createPaymentBody, - data, + newData, "no_three_ds", "manual", globalState @@ -109,9 +120,14 @@ describe.skip("[Payment] Incremental Auth", () => { "card_pm" ]["SaveCardUseNo3DSManualCaptureOffSession"]; + const newData = { + ...data, + Configs: { CONNECTOR_CREDENTIAL: { value: "connector_2" } }, + }; + cy.saveCardConfirmCallTest( fixtures.saveCardConfirmBody, - data, + newData, globalState ); diff --git a/cypress-tests/cypress/e2e/PaymentUtils/Cybersource.js b/cypress-tests/cypress/e2e/PaymentUtils/Cybersource.js index 6d8c42d54eb..9fc9653f0fe 100644 --- a/cypress-tests/cypress/e2e/PaymentUtils/Cybersource.js +++ b/cypress-tests/cypress/e2e/PaymentUtils/Cybersource.js @@ -107,12 +107,6 @@ export const connectorDetails = { }, }, PaymentIntentOffSession: { - Configs: { - CONNECTOR_CREDENTIAL: { - specName: "incrementalAuth", - value: "connector_2", - }, - }, Request: { currency: "USD", amount: 6500, @@ -725,8 +719,7 @@ export const connectorDetails = { SaveCardUseNo3DSManualCaptureOffSession: { Configs: { CONNECTOR_CREDENTIAL: { - specName: "incrementalAuth", - value: "connector_2", + value: "connector_1", }, }, Request: {