Skip to content

Commit 36a8196

Browse files
test: added frictionless test for netcetera and cvc check test
1 parent b1219a2 commit 36a8196

3 files changed

Lines changed: 38 additions & 0 deletions

File tree

cypress-tests/cypress/e2e/cvc-checks-e2e-test.cy.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,22 @@ describe("Card CVC Checks", () => {
122122
.should("have.value", "1234");
123123
});
124124
});
125+
126+
it("should display an error when CVC is empty for a saved card", () => {
127+
cy.wait(2000);
128+
129+
getIframeBody()
130+
.contains("div", "4 digit cvc t..")
131+
.should("exist")
132+
.click();
133+
cy.wait(1000);
134+
135+
getIframeBody().get("#submit").click();
136+
137+
getIframeBody()
138+
.contains("CVC Number cannot be empty")
139+
.should("be.visible");
140+
141+
cy.contains("Please enter all fields").should("be.visible");
142+
});
125143
});

cypress-tests/cypress/e2e/external-3DS-netcetera-e2e-test.cy.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as testIds from "../../../src/Utilities/TestUtils.bs";
22
import {
33
getClientURL,
44
netceteraChallengeTestCard,
5+
netceteraFrictionlessTestCard,
56
createPaymentBody,
67
changeObjectKeyValue,
78
connectorProfileIdMapping,
@@ -96,4 +97,22 @@ describe("External 3DS using Netcetera Checks", () => {
9697
);
9798
});
9899
});
100+
101+
it("If the user enters a frictionless card, the payment should be successful without a challenge.", () => {
102+
cy.wait(2000);
103+
getIframeBody().find(`[data-testid=${testIds.addNewCardIcon}]`).click();
104+
getIframeBody()
105+
.find(`[data-testid=${testIds.cardNoInputTestId}]`)
106+
.type(netceteraFrictionlessTestCard);
107+
getIframeBody()
108+
.find(`[data-testid=${testIds.expiryInputTestId}]`)
109+
.type("0444");
110+
cy.wait(1000);
111+
getIframeBody()
112+
.find(`[data-testid=${testIds.cardCVVInputTestId}]`)
113+
.type("1234");
114+
getIframeBody().get("#submit").click();
115+
cy.wait(4000);
116+
cy.contains("Thanks for your order!").should("be.visible");
117+
});
99118
});

cypress-tests/cypress/support/utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,4 @@ export const bluesnapTestCard = "4000000000001091";
142142
export const amexTestCard = "378282246310005";
143143
export const visaTestCard = "4242424242424242";
144144
export const netceteraChallengeTestCard = "348638267931507";
145+
export const netceteraFrictionlessTestCard = "4929251897047956";

0 commit comments

Comments
 (0)