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

This commit is contained in:
likhinbopanna
2025-04-25 12:48:29 +05:30
committed by GitHub
parent 0b9738a268
commit 9e82c40eed
4 changed files with 22 additions and 39 deletions

View File

@ -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",
};

View File

@ -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({

View File

@ -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;

View File

@ -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();