Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

ci(cypress): fix trustpay refund test cases (#7797)

likhinbopanna9e82c40eed78
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Commons.js b/cypress-tests/cypress/e2e/configs/Payment/Commons.js
index 1b875840d4..2aeae65000 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Commons.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Commons.js
@@ -13,7 +13,7 @@ export const customerAcceptance = {
const successfulNo3DSCardDetails = {
card_number: "4111111111111111",
card_exp_month: "08",
- card_exp_year: "50",
+ card_exp_year: "30",
card_holder_name: "joseph Doe",
card_cvc: "999",
};
@@ -21,7 +21,7 @@ const successfulNo3DSCardDetails = {
const successfulThreeDSTestCardDetails = {
card_number: "4111111111111111",
card_exp_month: "10",
- card_exp_year: "50",
+ card_exp_year: "30",
card_holder_name: "morino",
card_cvc: "999",
};
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Trustpay.js b/cypress-tests/cypress/e2e/configs/Payment/Trustpay.js
index fbd519e542..dac74ac9a6 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Trustpay.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Trustpay.js
@@ -4,7 +4,7 @@ import { getCustomExchange } from "./Modifiers";
const successfulNo3DSCardDetails = {
card_number: "4200000000000000",
card_exp_month: "10",
- card_exp_year: "50",
+ card_exp_year: "30",
card_holder_name: "joseph Doe",
card_cvc: "123",
};
@@ -12,7 +12,7 @@ const successfulNo3DSCardDetails = {
const successfulThreeDSTestCardDetails = {
card_number: "4200000000000067",
card_exp_month: "03",
- card_exp_year: "2030",
+ card_exp_year: "30",
card_holder_name: "John Doe",
card_cvc: "737",
};
@@ -30,12 +30,6 @@ const multiUseMandateData = {
export const connectorDetails = {
card_pm: {
PaymentIntent: getCustomExchange({
- Configs: {
- CONNECTOR_CREDENTIAL: {
- specName: ["refundPayment", "syncRefund"],
- value: "connector_2",
- },
- },
Request: {
currency: "USD",
customer_acceptance: null,
@@ -83,12 +77,6 @@ export const connectorDetails = {
},
},
"3DSAutoCapture": {
- Configs: {
- CONNECTOR_CREDENTIAL: {
- specName: ["refundPayment", "syncRefund"],
- value: "connector_2",
- },
- },
Request: {
payment_method: "card",
payment_method_data: {
@@ -106,12 +94,6 @@ export const connectorDetails = {
},
},
No3DSAutoCapture: {
- Configs: {
- CONNECTOR_CREDENTIAL: {
- specName: ["refundPayment", "syncRefund"],
- value: "connector_2",
- },
- },
Request: {
payment_method: "card",
payment_method_data: {
@@ -129,12 +111,6 @@ export const connectorDetails = {
},
},
Capture: {
- Configs: {
- CONNECTOR_CREDENTIAL: {
- specName: ["refundPayment", "syncRefund"],
- value: "connector_2",
- },
- },
Request: {
amount_to_capture: 6000,
},
@@ -152,10 +128,6 @@ export const connectorDetails = {
},
PartialCapture: {
Configs: {
- CONNECTOR_CREDENTIAL: {
- specName: ["refundPayment", "syncRefund"],
- value: "connector_2",
- },
DELAY: {
STATUS: true,
TIMEOUT: 15000,
@@ -313,6 +285,23 @@ export const connectorDetails = {
},
},
},
+ SessionToken: {
+ Response: {
+ status: 200,
+ body: {
+ session_token: [
+ {
+ wallet_name: "apple_pay",
+ connector: "trustpay",
+ },
+ {
+ wallet_name: "google_pay",
+ connector: "trustpay",
+ },
+ ],
+ },
+ },
+ },
},
bank_redirect_pm: {
PaymentIntent: getCustomExchange({
diff --git a/cypress-tests/cypress/e2e/spec/Payment/00014-SaveCardFlow.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00014-SaveCardFlow.cy.js
index 91fc25fde9..259ff24143 100644
--- a/cypress-tests/cypress/e2e/spec/Payment/00014-SaveCardFlow.cy.js
+++ b/cypress-tests/cypress/e2e/spec/Payment/00014-SaveCardFlow.cy.js
@@ -1,6 +1,6 @@
import * as fixtures from "../../../fixtures/imports";
-import State from "../../../utils/State";
import { generateRandomName } from "../../../utils/RequestBodyUtils";
+import State from "../../../utils/State";
import getConnectorDetails, * as utils from "../../configs/Payment/Utils";
let globalState;
diff --git a/cypress-tests/cypress/support/redirectionHandler.js b/cypress-tests/cypress/support/redirectionHandler.js
index 03b5142505..8172b72623 100644
--- a/cypress-tests/cypress/support/redirectionHandler.js
+++ b/cypress-tests/cypress/support/redirectionHandler.js
@@ -209,12 +209,6 @@ function bankRedirectRedirection(
"Allgemeine Sparkasse Oberösterreich Bank AG (ASPKAT2LXXX / 20320)"
);
cy.get("#selectionSubmit").click();
- cy.get("#user")
- .should("be.visible")
- .should("be.enabled")
- .focus()
- .type("Verfügernummer");
- cy.get("input#submitButton.btn.btn-primary").click();
break;
case "ideal":
cy.contains("button", "Select your bank").click();