Skip to content

Commit

Permalink
Cleaning up unused params
Browse files Browse the repository at this point in the history
  • Loading branch information
sponglord committed Nov 14, 2024
1 parent ba668ad commit 46e1621
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 4 additions & 0 deletions packages/e2e-playwright/models/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class Card extends Base {
readonly brandingIcon: Locator;

readonly expiryDateField: Locator;
readonly expiryDateLabelElement: Locator;
readonly expiryDateLabelText: Locator;
readonly expiryDateContextualElement: Locator;
readonly expiryDateLabelWithFocus: Locator;
Expand All @@ -35,6 +36,7 @@ class Card extends Base {
readonly expiryDateErrorElement: Locator;

readonly cvcField: Locator;
readonly cvcLabelElement: Locator;
readonly cvcLabelText: Locator;
readonly cvcLabelWithFocus: Locator;
readonly cvcErrorElement: Locator;
Expand Down Expand Up @@ -77,6 +79,7 @@ class Card extends Base {
* Expiry Date elements, in Checkout
*/
this.expiryDateField = this.rootElement.locator('.adyen-checkout__field--expiryDate'); // Holder
this.expiryDateLabelElement = this.expiryDateField.locator('.adyen-checkout__label');
this.expiryDateLabelText = this.expiryDateField.locator('.adyen-checkout__label__text');
this.expiryDateContextualElement = this.expiryDateField.locator('.adyen-checkout-contextual-text'); // Related contextual element
this.expiryDateErrorElement = this.expiryDateField.locator('.adyen-checkout-contextual-text--error'); // Related error element
Expand All @@ -93,6 +96,7 @@ class Card extends Base {
* Security code elements, in Checkout
*/
this.cvcField = this.rootElement.locator('.adyen-checkout__field--securityCode'); // Holder
this.cvcLabelElement = this.cvcField.locator('.adyen-checkout__label');
this.cvcLabelText = this.cvcField.locator('.adyen-checkout__label__text');
this.cvcContextualElement = this.cvcField.locator('.adyen-checkout-contextual-text'); // Related contextual element
this.cvcErrorElement = this.cvcField.locator('.adyen-checkout-contextual-text--error'); // Related error element
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { test, expect } from '../../../../../fixtures/card.fixture';
import { getStoryUrl } from '../../../../utils/getStoryUrl';
import { URL_MAP } from '../../../../../fixtures/URL_MAP';
import { AMEX_CARD, CARD_WITH_PAN_LENGTH, MAESTRO_CARD, MULTI_LUHN_MAESTRO, REGULAR_TEST_CARD } from '../../../../utils/constants';
import { AMEX_CARD, CARD_WITH_PAN_LENGTH, MULTI_LUHN_MAESTRO, REGULAR_TEST_CARD } from '../../../../utils/constants';
import { binLookupMock } from '../../../../../mocks/binLookup/binLookup.mock';
import {
hiddenDateWithPanLengthMock,
Expand All @@ -12,7 +12,7 @@ import {
} from '../../../../../mocks/binLookup/binLookup.data';

test.describe('Test how Card Component handles binLookup returning a panLength property (or not)', () => {
test("#1 Fill out PAN & see that focus stays on number field since binLookup doesn't return a panLength", async ({ card, page }) => {
test("#1 Fill out PAN & see that focus stays on number field since binLookup doesn't return a panLength", async ({ card }) => {
await card.goto(URL_MAP.card);

await card.isComponentVisible();
Expand All @@ -27,7 +27,7 @@ test.describe('Test how Card Component handles binLookup returning a panLength p
await expect(card.expiryDateLabelWithFocus).not.toBeVisible();
});

test('#2 Fill out PAN(binLookup w. panLength), maxLength is set on cardNumber SF, and that focus moves to expiryDate', async ({ card, page }) => {
test('#2 Fill out PAN(binLookup w. panLength), maxLength is set on cardNumber SF, and that focus moves to expiryDate', async ({ card }) => {
await card.goto(URL_MAP.card);

await card.isComponentVisible();
Expand Down Expand Up @@ -186,8 +186,7 @@ test.describe('Test how Card Component handles binLookup returning a panLength p
);

test('#9 Fill out PAN with Visa num that binLookup says has a panLength of 16 - you should not then be able to type more digits in the card number field', async ({
card,
page
card
}) => {
await card.goto(URL_MAP.card);

Expand Down

0 comments on commit 46e1621

Please sign in to comment.