Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(cypress): Fix payment method id for non supported connectors #5075

Merged
merged 3 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
ci(cypress): Fix payment method id for non supported connectors
  • Loading branch information
likhinbopanna committed Jun 21, 2024
commit 79630955a21c69767506440a03652a21e8cc6fd6
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
});
});

beforeEach(function () {
if (!should_continue) {
this.skip();
}
after("flush global state", () => {
cy.task("setGlobalState", globalState.data);
});

afterEach("flush global state", () => {
Expand All @@ -30,6 +28,13 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
"Card - NoThreeDS Create and Confirm Automatic CIT and MIT payment flow test",
() => {
let should_continue = true;

beforeEach(function () {
if (!should_continue) {
this.skip();
}
});

it("Create No 3DS Payment Intent", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
Expand Down Expand Up @@ -81,6 +86,12 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
() => {
let should_continue = true;

beforeEach(function () {
if (!should_continue) {
this.skip();
}
});

it("Create No 3DS Payment Intent", () => {
let data = getConnectorDetails(globalState.get("connectorId"))[
"card_pm"
Expand Down Expand Up @@ -144,6 +155,12 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
() => {
let should_continue = true;

beforeEach(function () {
if (!should_continue) {
this.skip();
}
});

it("Confirm No 3DS CIT", () => {
console.log("confirm -> " + globalState.get("connectorId"));
let data = getConnectorDetails(globalState.get("connectorId"))[
Expand Down Expand Up @@ -180,6 +197,12 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
() => {
let should_continue = true;

beforeEach(function () {
if (!should_continue) {
this.skip();
}
});

it("Confirm No 3DS CIT", () => {
console.log("confirm -> " + globalState.get("connectorId"));
let data = getConnectorDetails(globalState.get("connectorId"))[
Expand Down Expand Up @@ -253,6 +276,12 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
() => {
let should_continue = true;

beforeEach(function () {
if (!should_continue) {
this.skip();
}
});

it("Confirm 3DS CIT", () => {
console.log("confirm -> " + globalState.get("connectorId"));
let data = getConnectorDetails(globalState.get("connectorId"))[
Expand Down Expand Up @@ -294,6 +323,12 @@ describe("Card - Mandates using Payment Method Id flow test", () => {
() => {
let should_continue = true;

beforeEach(function () {
if (!should_continue) {
this.skip();
}
});

it("Confirm 3DS CIT", () => {
console.log("confirm -> " + globalState.get("connectorId"));
let data = getConnectorDetails(globalState.get("connectorId"))[
Expand Down
16 changes: 8 additions & 8 deletions cypress-tests/cypress/e2e/PaymentUtils/Trustpay.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export const connectorDetails = {
card: successfulThreeDSTestCardDetails,
},
currency: "USD",
mandate_data: singleUseMandateData,
mandate_data: singleUseMandateData,
},
Response: {
status: 400,
Expand All @@ -246,7 +246,7 @@ export const connectorDetails = {
card: successfulThreeDSTestCardDetails,
},
currency: "USD",
mandate_data: singleUseMandateData,
mandate_data: singleUseMandateData,
},
Response: {
status: 400,
Expand All @@ -265,7 +265,7 @@ export const connectorDetails = {
card: successfulNo3DSCardDetails,
},
currency: "USD",
mandate_data: singleUseMandateData,
mandate_data: singleUseMandateData,
},
Response: {
status: 400,
Expand All @@ -284,7 +284,7 @@ export const connectorDetails = {
card: successfulNo3DSCardDetails,
},
currency: "USD",
mandate_data: singleUseMandateData,
mandate_data: singleUseMandateData,
},
Response: {
status: 400,
Expand All @@ -303,7 +303,7 @@ export const connectorDetails = {
card: successfulNo3DSCardDetails,
},
currency: "USD",
mandate_data: multiUseMandateData,
mandate_data: multiUseMandateData,
},
Response: {
status: 400,
Expand All @@ -322,7 +322,7 @@ export const connectorDetails = {
card: successfulNo3DSCardDetails,
},
currency: "USD",
mandate_data: multiUseMandateData,
mandate_data: multiUseMandateData,
},
Response: {
status: 400,
Expand Down Expand Up @@ -485,7 +485,7 @@ export const connectorDetails = {
type: "invalid_request",
message: "Payment method type not supported",
code: "HE_03",
reason: "debit mandate payment is not supported by trustpay",
reason: "manual is not supported by trustpay",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need some discussion around this, other than that, LGTM!

},
},
},
Expand Down Expand Up @@ -542,7 +542,7 @@ export const connectorDetails = {
type: "invalid_request",
message: "Payment method type not supported",
code: "HE_03",
reason: "debit mandate payment is not supported by trustpay",
reason: "manual is not supported by trustpay",
},
},
},
Expand Down
Loading