Skip to content

Commit

Permalink
Using pressSequentially instead of type. Stop using mergeTests unnece…
Browse files Browse the repository at this point in the history
…ssarily.
  • Loading branch information
sponglord committed Nov 21, 2024
1 parent beae11f commit 54b4fa0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
6 changes: 3 additions & 3 deletions packages/e2e-playwright/models/card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class Card extends Base {
}

async typeCardNumber(cardNumber: string) {
await this.cardNumberInput.type(cardNumber, { delay: USER_TYPE_DELAY });
await this.cardNumberInput.pressSequentially(cardNumber, { delay: USER_TYPE_DELAY });
}

async deleteCardNumber() {
Expand All @@ -166,7 +166,7 @@ class Card extends Base {
}

async typeExpiryDate(expiryDate: string) {
await this.expiryDateInput.type(expiryDate, { delay: USER_TYPE_DELAY });
await this.expiryDateInput.pressSequentially(expiryDate, { delay: USER_TYPE_DELAY });
}

async fillCvc(cvc: string) {
Expand All @@ -176,7 +176,7 @@ class Card extends Base {
}

async typeCvc(cvc: string) {
await this.cvcInput.type(cvc, { delay: USER_TYPE_DELAY });
await this.cvcInput.pressSequentially(cvc, { delay: USER_TYPE_DELAY });
}

async selectListItem(who: string) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import { mergeTests, expect } from '@playwright/test';
import { test as cardWithKCP } from '../../../../../fixtures/card.fixture';
import { test, expect } from '../../../../../fixtures/card.fixture';
import { getStoryUrl } from '../../../../utils/getStoryUrl';
import { URL_MAP } from '../../../../../fixtures/URL_MAP';
import { binLookupMock } from '../../../../../mocks/binLookup/binLookup.mock';
import { kcpMockOptionalDateAndCvcWithPanLengthMock } from '../../../../../mocks/binLookup/binLookup.data';
import { REGULAR_TEST_CARD } from '../../../../utils/constants';

const test = mergeTests(cardWithKCP);

const componentConfig = {
brands: ['mc', 'visa', 'amex', 'korean_local_card'],
configuration: { koreanAuthenticationRequired: true },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import { mergeTests, expect } from '@playwright/test';
import { test as cardWithSSN } from '../../../../../fixtures/card.fixture';
import { test, expect } from '../../../../../fixtures/card.fixture';
import { getStoryUrl } from '../../../../utils/getStoryUrl';
import { URL_MAP } from '../../../../../fixtures/URL_MAP';
import { binLookupMock } from '../../../../../mocks/binLookup/binLookup.mock';
import { optionalDateAndCvcWithPanLengthMock } from '../../../../../mocks/binLookup/binLookup.data';
import { REGULAR_TEST_CARD } from '../../../../utils/constants';

const test = mergeTests(cardWithSSN);

test.describe('Test Card, binLookup w. panLength property & social security number', () => {
test('#1 Fill out PAN see that focus moves to social security number since expiryDate & cvc are optional', async ({ cardWithSSN, page }) => {
await binLookupMock(page, optionalDateAndCvcWithPanLengthMock);
Expand Down

0 comments on commit 54b4fa0

Please sign in to comment.