Skip to content

Commit

Permalink
refactor: do not hard code configs
Browse files Browse the repository at this point in the history
  • Loading branch information
pixincreate committed Dec 2, 2024
1 parent 5c45080 commit 490911c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
22 changes: 3 additions & 19 deletions cypress-tests/cypress/e2e/PaymentTest/00026-IncrementalAuth.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ describe.skip("[Payment] Incremental Auth", () => {

const newData = {
...data,
Configs: { CONNECTOR_CREDENTIAL: { value: "connector_2" } },
Request: {
...data.Request,
request_incremental_authorization: true,
Expand All @@ -55,12 +54,7 @@ describe.skip("[Payment] Incremental Auth", () => {
"card_pm"
]["SaveCardUseNo3DSManualCaptureOffSession"];

const newData = {
...data,
Configs: { CONNECTOR_CREDENTIAL: { value: "connector_2" } },
};

cy.confirmCallTest(fixtures.confirmBody, newData, true, globalState);
cy.confirmCallTest(fixtures.confirmBody, data, true, globalState);

if (shouldContinue) shouldContinue = utils.should_continue_further(data);
});
Expand Down Expand Up @@ -100,14 +94,9 @@ describe.skip("[Payment] Incremental Auth", () => {
"card_pm"
]["PaymentIntentOffSession"];

const newData = {
...data,
Configs: { CONNECTOR_CREDENTIAL: { value: "connector_2" } },
};

cy.createPaymentIntentTest(
fixtures.createPaymentBody,
newData,
data,
"no_three_ds",
"manual",
globalState
Expand All @@ -120,14 +109,9 @@ describe.skip("[Payment] Incremental Auth", () => {
"card_pm"
]["SaveCardUseNo3DSManualCaptureOffSession"];

const newData = {
...data,
Configs: { CONNECTOR_CREDENTIAL: { value: "connector_2" } },
};

cy.saveCardConfirmCallTest(
fixtures.saveCardConfirmBody,
newData,
data,
globalState
);

Expand Down
9 changes: 8 additions & 1 deletion cypress-tests/cypress/e2e/PaymentUtils/Cybersource.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ export const connectorDetails = {
},
},
PaymentIntentOffSession: {
Configs: {
CONNECTOR_CREDENTIAL: {
specName: "incrementalAuth",
value: "connector_2",
},
},
Request: {
currency: "USD",
amount: 6500,
Expand Down Expand Up @@ -719,7 +725,8 @@ export const connectorDetails = {
SaveCardUseNo3DSManualCaptureOffSession: {
Configs: {
CONNECTOR_CREDENTIAL: {
value: "connector_1",
specName: "incrementalAuth",
value: "connector_2",
},
},
Request: {
Expand Down

0 comments on commit 490911c

Please sign in to comment.