Skip to content

Commit 74a9e4d

Browse files
committed
re-do
- auto-formatting - remove hardcoded creds path for exporting them through env - remove deplicated logger code for calling it through a functionQ
1 parent 7f0d04f commit 74a9e4d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+520
-595
lines changed

cypress-tests/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
creds.json
2-
screenshots
2+
screenshots

cypress-tests/cypress.env.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{}
1+
{}

cypress-tests/cypress/e2e/ConnectorTest/00000-AccountCreate.cy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import merchantCreateBody from "../../fixtures/merchant-create-body.json";
21
import apiKeyCreateBody from "../../fixtures/create-api-key-body.json";
2+
import merchantCreateBody from "../../fixtures/merchant-create-body.json";
33
import State from "../../utils/State";
44

55
let globalState;

cypress-tests/cypress/e2e/ConnectorTest/00003-NoThreeDSAutoCapture.cy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import createPaymentBody from "../../fixtures/create-payment-body.json";
2-
import createConfirmPaymentBody from "../../fixtures/create-confirm-body.json";
31
import confirmBody from "../../fixtures/confirm-body.json";
4-
import getConnectorDetails from "../ConnectorUtils/utils";
2+
import createConfirmPaymentBody from "../../fixtures/create-confirm-body.json";
3+
import createPaymentBody from "../../fixtures/create-payment-body.json";
54
import State from "../../utils/State";
5+
import getConnectorDetails from "../ConnectorUtils/utils";
66

77
let globalState;
88

cypress-tests/cypress/e2e/ConnectorTest/00004-ThreeDSAutoCapture.cy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import createPaymentBody from "../../fixtures/create-payment-body.json";
21
import confirmBody from "../../fixtures/confirm-body.json";
3-
import getConnectorDetails from "../ConnectorUtils/utils";
2+
import createPaymentBody from "../../fixtures/create-payment-body.json";
43
import State from "../../utils/State";
4+
import getConnectorDetails from "../ConnectorUtils/utils";
55

66
let globalState;
77

cypress-tests/cypress/e2e/ConnectorTest/00005-NoThreeDSManualCapture.cy.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import createPaymentBody from "../../fixtures/create-payment-body.json";
2-
import createConfirmPaymentBody from "../../fixtures/create-confirm-body.json";
1+
import captureBody from "../../fixtures/capture-flow-body.json";
32
import confirmBody from "../../fixtures/confirm-body.json";
4-
import getConnectorDetails from "../ConnectorUtils/utils";
3+
import createConfirmPaymentBody from "../../fixtures/create-confirm-body.json";
4+
import createPaymentBody from "../../fixtures/create-payment-body.json";
55
import State from "../../utils/State";
6-
import captureBody from "../../fixtures/capture-flow-body.json";
6+
import getConnectorDetails from "../ConnectorUtils/utils";
77

88
let globalState;
99

cypress-tests/cypress/e2e/ConnectorTest/00006-VoidPayment.cy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import createPaymentBody from "../../fixtures/create-payment-body.json";
21
import confirmBody from "../../fixtures/confirm-body.json";
3-
import getConnectorDetails from "../ConnectorUtils/utils";
4-
import State from "../../utils/State";
2+
import createPaymentBody from "../../fixtures/create-payment-body.json";
53
import voidBody from "../../fixtures/void-payment-body.json";
4+
import State from "../../utils/State";
5+
import getConnectorDetails from "../ConnectorUtils/utils";
66

77
let globalState;
88

cypress-tests/cypress/e2e/ConnectorTest/00007-SyncPayment.cy.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import createPaymentBody from "../../fixtures/create-payment-body.json";
21
import confirmBody from "../../fixtures/confirm-body.json";
3-
import getConnectorDetails from "../ConnectorUtils/utils";
2+
import createPaymentBody from "../../fixtures/create-payment-body.json";
43
import State from "../../utils/State";
4+
import getConnectorDetails from "../ConnectorUtils/utils";
55

66
let globalState;
77

cypress-tests/cypress/e2e/ConnectorTest/00008-RefundPayment.cy.js

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
import createPaymentBody from "../../fixtures/create-payment-body.json";
1+
import captureBody from "../../fixtures/capture-flow-body.json";
22
import confirmBody from "../../fixtures/confirm-body.json";
33
import createConfirmPaymentBody from "../../fixtures/create-confirm-body.json";
4-
import getConnectorDetails from "../ConnectorUtils/utils";
5-
import captureBody from "../../fixtures/capture-flow-body.json";
6-
import refundBody from "../../fixtures/refund-flow-body.json";
74
import citConfirmBody from "../../fixtures/create-mandate-cit.json";
85
import mitConfirmBody from "../../fixtures/create-mandate-mit.json";
6+
import createPaymentBody from "../../fixtures/create-payment-body.json";
7+
import refundBody from "../../fixtures/refund-flow-body.json";
98
import State from "../../utils/State";
9+
import getConnectorDetails from "../ConnectorUtils/utils";
1010

1111
let globalState;
1212

@@ -89,32 +89,32 @@ describe("Card - Refund flow test", () => {
8989
context("Fully Refund Card-NoThreeDS payment flow test Create+Confirm", () => {
9090

9191
it("create+confirm-payment-call-test", () => {
92-
console.log("confirm -> " + globalState.get("connectorId"));
93-
let det = getConnectorDetails(globalState.get("connectorId"))["No3DS"];
94-
cy.createConfirmPaymentTest( createConfirmPaymentBody, det,"no_three_ds", "automatic", globalState);
92+
console.log("confirm -> " + globalState.get("connectorId"));
93+
let det = getConnectorDetails(globalState.get("connectorId"))["No3DS"];
94+
cy.createConfirmPaymentTest(createConfirmPaymentBody, det, "no_three_ds", "automatic", globalState);
9595
});
96-
97-
it("retrieve-payment-call-test", () => {
98-
cy.retrievePaymentCallTest(globalState);
96+
97+
it("retrieve-payment-call-test", () => {
98+
cy.retrievePaymentCallTest(globalState);
9999
});
100100

101101
it("refund-call-test", () => {
102102
let det = getConnectorDetails(globalState.get("connectorId"))["No3DS"];
103103
cy.refundCallTest(refundBody, 6540, det, globalState);
104104
});
105-
105+
106106
});
107107

108108
context("Partially Refund Card-NoThreeDS payment flow test Create+Confirm", () => {
109109

110110
it("create+confirm-payment-call-test", () => {
111-
console.log("confirm -> " + globalState.get("connectorId"));
112-
let det = getConnectorDetails(globalState.get("connectorId"))["No3DS"];
113-
cy.createConfirmPaymentTest( createConfirmPaymentBody, det,"no_three_ds", "automatic", globalState);
111+
console.log("confirm -> " + globalState.get("connectorId"));
112+
let det = getConnectorDetails(globalState.get("connectorId"))["No3DS"];
113+
cy.createConfirmPaymentTest(createConfirmPaymentBody, det, "no_three_ds", "automatic", globalState);
114114
});
115-
116-
it("retrieve-payment-call-test", () => {
117-
cy.retrievePaymentCallTest(globalState);
115+
116+
it("retrieve-payment-call-test", () => {
117+
cy.retrievePaymentCallTest(globalState);
118118
});
119119

120120
it("refund-call-test", () => {
@@ -131,7 +131,7 @@ describe("Card - Refund flow test", () => {
131131
let det = getConnectorDetails(globalState.get("connectorId"))["No3DS"];
132132
cy.syncRefundCallTest(det, globalState);
133133
});
134-
134+
135135
});
136136

137137
context("Card - Full Refund for fully captured No-3DS payment", () => {
@@ -276,37 +276,37 @@ describe("Card - Refund flow test", () => {
276276
let det = getConnectorDetails(globalState.get("connectorId"))["No3DS"];
277277
cy.createPaymentIntentTest(createPaymentBody, det, "no_three_ds", "manual", globalState);
278278
});
279-
279+
280280
it("payment_methods-call-test", () => {
281281
cy.paymentMethodsCallTest(globalState);
282282
});
283-
283+
284284
it("confirm-call-test", () => {
285285
console.log("confirm -> " + globalState.get("connectorId"));
286286
let det = getConnectorDetails(globalState.get("connectorId"))["No3DS"];
287287
console.log("det -> " + det.card);
288288
cy.confirmCallTest(confirmBody, det, true, globalState);
289289
});
290-
290+
291291
it("retrieve-payment-call-test", () => {
292292
cy.retrievePaymentCallTest(globalState);
293293
});
294-
294+
295295
it("capture-call-test", () => {
296296
let det = getConnectorDetails(globalState.get("connectorId"))["No3DS"];
297297
console.log("det -> " + det.card);
298298
cy.captureCallTest(captureBody, 4000, det.paymentSuccessfulStatus, globalState);
299299
});
300-
300+
301301
it("retrieve-payment-call-test", () => {
302302
cy.retrievePaymentCallTest(globalState);
303303
});
304-
304+
305305
it("refund-call-test", () => {
306306
let det = getConnectorDetails(globalState.get("connectorId"))["No3DS"];
307307
cy.refundCallTest(refundBody, 3000, det, globalState);
308308
});
309-
309+
310310
it("sync-refund-call-test", () => {
311311
let det = getConnectorDetails(globalState.get("connectorId"))["No3DS"];
312312
cy.syncRefundCallTest(det, globalState);
@@ -333,10 +333,10 @@ describe("Card - Refund flow test", () => {
333333
let det = getConnectorDetails(globalState.get("connectorId"))["No3DS"];
334334
cy.refundCallTest(refundBody, 7000, det, globalState);
335335
});
336-
336+
337337
it("sync-refund-call-test", () => {
338-
let det = getConnectorDetails(globalState.get("connectorId"))["No3DS"];
339-
cy.syncRefundCallTest(det, globalState);
338+
let det = getConnectorDetails(globalState.get("connectorId"))["No3DS"];
339+
cy.syncRefundCallTest(det, globalState);
340340
});
341341
});
342342

cypress-tests/cypress/e2e/ConnectorTest/00009-SyncRefund.cy.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import createPaymentBody from "../../fixtures/create-payment-body.json";
21
import confirmBody from "../../fixtures/confirm-body.json";
3-
import getConnectorDetails from "../ConnectorUtils/utils";
4-
import refundBody from "../../fixtures/refund-flow-body.json"
2+
import createPaymentBody from "../../fixtures/create-payment-body.json";
3+
import refundBody from "../../fixtures/refund-flow-body.json";
54
import State from "../../utils/State";
5+
import getConnectorDetails from "../ConnectorUtils/utils";
66

77
let globalState;
88

0 commit comments

Comments
 (0)