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
Rust adyenbeginner-friendlyfeaturedfinancefintechhacktoberfesthigh-performanceopen-sourceorchestrationpaymentpayment-gatewaypayment-integrationpayment-processingpaymentspayments-platformrestful-apirustsdkstripeworks-with-react
ci(cypress): fix nmi and paypal (#7173)
Pa1NarKd5cbc1d46c79
diff --git a/.github/workflows/cypress-tests-runner.yml b/.github/workflows/cypress-tests-runner.ymlindex 67efcdb0ea..dbef78355d 100644--- a/.github/workflows/cypress-tests-runner.yml+++ b/.github/workflows/cypress-tests-runner.yml@@ -13,7 +13,7 @@ concurrency:env:CARGO_INCREMENTAL: 0CARGO_NET_RETRY: 10- PAYMENTS_CONNECTORS: "cybersource"+ PAYMENTS_CONNECTORS: "cybersource stripe"PAYOUTS_CONNECTORS: "wise"RUST_BACKTRACE: shortRUSTUP_MAX_RETRIES: 10diff --git a/cypress-tests/cypress/e2e/configs/Payment/Utils.js b/cypress-tests/cypress/e2e/configs/Payment/Utils.jsindex 5a9baa32d7..b3de4db78d 100644--- a/cypress-tests/cypress/e2e/configs/Payment/Utils.js+++ b/cypress-tests/cypress/e2e/configs/Payment/Utils.js@@ -4,7 +4,7 @@ import { connectorDetails as adyenConnectorDetails } from "./Adyen.js";import { connectorDetails as bankOfAmericaConnectorDetails } from "./BankOfAmerica.js";import { connectorDetails as bluesnapConnectorDetails } from "./Bluesnap.js";import { connectorDetails as checkoutConnectorDetails } from "./Checkout.js";-import { connectorDetails as CommonConnectorDetails } from "./Commons.js";+import { connectorDetails as commonConnectorDetails } from "./Commons.js";import { updateDefaultStatusCode } from "./Modifiers.js";import { connectorDetails as cybersourceConnectorDetails } from "./Cybersource.js";import { connectorDetails as datatransConnectorDetails } from "./Datatrans.js";@@ -32,7 +32,7 @@ const connectorDetails = {bankofamerica: bankOfAmericaConnectorDetails,bluesnap: bluesnapConnectorDetails,checkout: checkoutConnectorDetails,- commons: CommonConnectorDetails,+ commons: commonConnectorDetails,cybersource: cybersourceConnectorDetails,deutschebank: deutschebankConnectorDetails,fiservemea: fiservemeaConnectorDetails,@@ -307,3 +307,26 @@ export function updateBusinessProfile(profilePrefix);}++export const CONNECTOR_LISTS = {+ // Exclusion lists (skip these connectors)+ EXCLUDE: {+ CONNECTOR_AGNOSTIC_NTID: ["paypal"],+ // Add more exclusion lists+ },++ // Inclusion lists (only run for these connectors)+ INCLUDE: {+ MANDATES_USING_NTID_PROXY: ["cybersource"],+ // Add more inclusion lists+ },+};++// Helper functions+export const shouldExcludeConnector = (connectorId, list) => {+ return list.includes(connectorId);+};++export const shouldIncludeConnector = (connectorId, list) => {+ return !list.includes(connectorId);+};diff --git a/cypress-tests/cypress/e2e/spec/Payment/00020-MandatesUsingNTIDProxy.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00020-MandatesUsingNTIDProxy.cy.jsindex 1554436abf..67697cac6c 100644--- a/cypress-tests/cypress/e2e/spec/Payment/00020-MandatesUsingNTIDProxy.cy.js+++ b/cypress-tests/cypress/e2e/spec/Payment/00020-MandatesUsingNTIDProxy.cy.js@@ -6,11 +6,31 @@ let globalState;let connector;describe("Card - Mandates using Network Transaction Id flow test", () => {- before("seed global state", () => {- cy.task("getGlobalState").then((state) => {- globalState = new State(state);- connector = globalState.get("connectorId");- });+ before(function () {+ // Changed to regular function instead of arrow function+ let skip = false;++ cy.task("getGlobalState")+ .then((state) => {+ globalState = new State(state);+ connector = globalState.get("connectorId");++ // Skip the test if the connector is not in the inclusion list+ // This is done because only cybersource is known to support at present+ if (+ utils.shouldIncludeConnector(+ connector,+ utils.CONNECTOR_LISTS.INCLUDE.MANDATES_USING_NTID_PROXY+ )+ ) {+ skip = true;+ }+ })+ .then(() => {+ if (skip) {+ this.skip();+ }+ });});afterEach("flush global state", () => {@@ -20,12 +40,6 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {context("Card - NoThreeDS Create and Confirm Automatic MIT payment flow test",() => {- beforeEach(function () {- if (connector !== "cybersource") {- this.skip();- }- });-it("Confirm No 3DS MIT", () => {const data = getConnectorDetails(globalState.get("connectorId"))["card_pm"@@ -46,12 +60,6 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {context("Card - NoThreeDS Create and Confirm Manual MIT payment flow test",() => {- beforeEach(function () {- if (connector !== "cybersource") {- this.skip();- }- });-it("Confirm No 3DS MIT", () => {const data = getConnectorDetails(globalState.get("connectorId"))["card_pm"@@ -72,12 +80,6 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {context("Card - NoThreeDS Create and Confirm Automatic multiple MITs payment flow test",() => {- beforeEach(function () {- if (connector !== "cybersource") {- this.skip();- }- });-it("Confirm No 3DS MIT", () => {const data = getConnectorDetails(globalState.get("connectorId"))["card_pm"@@ -114,12 +116,6 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {() => {let shouldContinue = true;- beforeEach(function () {- if (connector !== "cybersource") {- this.skip();- }- });-it("Confirm No 3DS MIT 1", () => {const data = getConnectorDetails(globalState.get("connectorId"))["card_pm"@@ -177,12 +173,6 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {context("Card - ThreeDS Create and Confirm Automatic multiple MITs payment flow test",() => {- beforeEach(function () {- if (connector !== "cybersource") {- this.skip();- }- });-it("Confirm No 3DS MIT", () => {const data = getConnectorDetails(globalState.get("connectorId"))["card_pm"@@ -217,12 +207,6 @@ describe("Card - Mandates using Network Transaction Id flow test", () => {context("Card - ThreeDS Create and Confirm Manual multiple MITs payment flow",() => {- beforeEach(function () {- if (connector !== "cybersource") {- this.skip();- }- });-it("Confirm No 3DS MIT", () => {const data = getConnectorDetails(globalState.get("connectorId"))["card_pm"diff --git a/cypress-tests/cypress/e2e/spec/Payment/00022-Variations.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00022-Variations.cy.jsindex f1499dc93b..5a1f765cf6 100644--- a/cypress-tests/cypress/e2e/spec/Payment/00022-Variations.cy.js+++ b/cypress-tests/cypress/e2e/spec/Payment/00022-Variations.cy.js@@ -222,6 +222,14 @@ describe("Corner cases", () => {if (shouldContinue) shouldContinue = utils.should_continue_further(data);});+ it("Retrieve payment", () => {+ const data = getConnectorDetails(globalState.get("connectorId"))[+ "card_pm"+ ]["No3DSManualCapture"];++ cy.retrievePaymentCallTest(globalState, data);+ });+it("Capture call", () => {const data = getConnectorDetails(globalState.get("commons"))["card_pm"]["CaptureGreaterAmount"diff --git a/cypress-tests/cypress/e2e/spec/Payment/00024-ConnectorAgnosticNTID.cy.js b/cypress-tests/cypress/e2e/spec/Payment/00024-ConnectorAgnosticNTID.cy.jsindex 4db0ad9990..308a8c036c 100644--- a/cypress-tests/cypress/e2e/spec/Payment/00024-ConnectorAgnosticNTID.cy.js+++ b/cypress-tests/cypress/e2e/spec/Payment/00024-ConnectorAgnosticNTID.cy.js@@ -4,6 +4,7 @@ import { payment_methods_enabled } from "../../configs/Payment/Commons";import getConnectorDetails, * as utils from "../../configs/Payment/Utils";let globalState;+let connector;/*Flow:@@ -32,10 +33,30 @@ Flow:*/describe("Connector Agnostic Tests", () => {- before("seed global state", () => {- cy.task("getGlobalState").then((state) => {- globalState = new State(state);- });+ before(function () {+ // Changed to regular function instead of arrow function+ let skip = false;++ cy.task("getGlobalState")+ .then((state) => {+ globalState = new State(state);+ connector = globalState.get("connectorId");++ // Skip running test against a connector that is added in the exclude list+ if (+ utils.shouldExcludeConnector(+ connector,+ utils.CONNECTOR_LISTS.EXCLUDE.CONNECTOR_AGNOSTIC_NTID+ )+ ) {+ skip = true;+ }+ })+ .then(() => {+ if (skip) {+ this.skip();+ }+ });});after("flush global state", () => {