1
- import createPaymentBody from "../../fixtures/create-payment -body.json" ;
1
+ import captureBody from "../../fixtures/capture-flow -body.json" ;
2
2
import confirmBody from "../../fixtures/confirm-body.json" ;
3
3
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" ;
7
4
import citConfirmBody from "../../fixtures/create-mandate-cit.json" ;
8
5
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" ;
9
8
import State from "../../utils/State" ;
9
+ import getConnectorDetails from "../ConnectorUtils/utils" ;
10
10
11
11
let globalState ;
12
12
@@ -89,32 +89,32 @@ describe("Card - Refund flow test", () => {
89
89
context ( "Fully Refund Card-NoThreeDS payment flow test Create+Confirm" , ( ) => {
90
90
91
91
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 ) ;
95
95
} ) ;
96
-
97
- it ( "retrieve-payment-call-test" , ( ) => {
98
- cy . retrievePaymentCallTest ( globalState ) ;
96
+
97
+ it ( "retrieve-payment-call-test" , ( ) => {
98
+ cy . retrievePaymentCallTest ( globalState ) ;
99
99
} ) ;
100
100
101
101
it ( "refund-call-test" , ( ) => {
102
102
let det = getConnectorDetails ( globalState . get ( "connectorId" ) ) [ "No3DS" ] ;
103
103
cy . refundCallTest ( refundBody , 6540 , det , globalState ) ;
104
104
} ) ;
105
-
105
+
106
106
} ) ;
107
107
108
108
context ( "Partially Refund Card-NoThreeDS payment flow test Create+Confirm" , ( ) => {
109
109
110
110
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 ) ;
114
114
} ) ;
115
-
116
- it ( "retrieve-payment-call-test" , ( ) => {
117
- cy . retrievePaymentCallTest ( globalState ) ;
115
+
116
+ it ( "retrieve-payment-call-test" , ( ) => {
117
+ cy . retrievePaymentCallTest ( globalState ) ;
118
118
} ) ;
119
119
120
120
it ( "refund-call-test" , ( ) => {
@@ -131,7 +131,7 @@ describe("Card - Refund flow test", () => {
131
131
let det = getConnectorDetails ( globalState . get ( "connectorId" ) ) [ "No3DS" ] ;
132
132
cy . syncRefundCallTest ( det , globalState ) ;
133
133
} ) ;
134
-
134
+
135
135
} ) ;
136
136
137
137
context ( "Card - Full Refund for fully captured No-3DS payment" , ( ) => {
@@ -276,37 +276,37 @@ describe("Card - Refund flow test", () => {
276
276
let det = getConnectorDetails ( globalState . get ( "connectorId" ) ) [ "No3DS" ] ;
277
277
cy . createPaymentIntentTest ( createPaymentBody , det , "no_three_ds" , "manual" , globalState ) ;
278
278
} ) ;
279
-
279
+
280
280
it ( "payment_methods-call-test" , ( ) => {
281
281
cy . paymentMethodsCallTest ( globalState ) ;
282
282
} ) ;
283
-
283
+
284
284
it ( "confirm-call-test" , ( ) => {
285
285
console . log ( "confirm -> " + globalState . get ( "connectorId" ) ) ;
286
286
let det = getConnectorDetails ( globalState . get ( "connectorId" ) ) [ "No3DS" ] ;
287
287
console . log ( "det -> " + det . card ) ;
288
288
cy . confirmCallTest ( confirmBody , det , true , globalState ) ;
289
289
} ) ;
290
-
290
+
291
291
it ( "retrieve-payment-call-test" , ( ) => {
292
292
cy . retrievePaymentCallTest ( globalState ) ;
293
293
} ) ;
294
-
294
+
295
295
it ( "capture-call-test" , ( ) => {
296
296
let det = getConnectorDetails ( globalState . get ( "connectorId" ) ) [ "No3DS" ] ;
297
297
console . log ( "det -> " + det . card ) ;
298
298
cy . captureCallTest ( captureBody , 4000 , det . paymentSuccessfulStatus , globalState ) ;
299
299
} ) ;
300
-
300
+
301
301
it ( "retrieve-payment-call-test" , ( ) => {
302
302
cy . retrievePaymentCallTest ( globalState ) ;
303
303
} ) ;
304
-
304
+
305
305
it ( "refund-call-test" , ( ) => {
306
306
let det = getConnectorDetails ( globalState . get ( "connectorId" ) ) [ "No3DS" ] ;
307
307
cy . refundCallTest ( refundBody , 3000 , det , globalState ) ;
308
308
} ) ;
309
-
309
+
310
310
it ( "sync-refund-call-test" , ( ) => {
311
311
let det = getConnectorDetails ( globalState . get ( "connectorId" ) ) [ "No3DS" ] ;
312
312
cy . syncRefundCallTest ( det , globalState ) ;
@@ -333,10 +333,10 @@ describe("Card - Refund flow test", () => {
333
333
let det = getConnectorDetails ( globalState . get ( "connectorId" ) ) [ "No3DS" ] ;
334
334
cy . refundCallTest ( refundBody , 7000 , det , globalState ) ;
335
335
} ) ;
336
-
336
+
337
337
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 ) ;
340
340
} ) ;
341
341
} ) ;
342
342
0 commit comments