Skip to content

Commit

Permalink
Shortened test descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
sponglord committed Nov 15, 2024
1 parent 5f72fbf commit edb9f47
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import {
optionalDateWithPanLengthMock
} 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 }) => {
test.describe('Test Card, & binLookup w/o panLength property', () => {
test('#1 Fill out PAN & see that focus stays on number field', async ({ card }) => {
await card.goto(URL_MAP.card);

await card.isComponentVisible();
Expand All @@ -26,8 +26,10 @@ test.describe('Test how Card Component handles binLookup returning a panLength p
await expect(card.cardNumberLabelWithFocus).toBeVisible();
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 }) => {
test.describe('Test Card, & binLookup w. panLength property', () => {
test('#1 Fill out PAN and see maxLength is set on cardNumber SF, and that focus moves to expiryDate', async ({ card }) => {
await card.goto(URL_MAP.card);

await card.isComponentVisible();
Expand All @@ -49,7 +51,7 @@ test.describe('Test how Card Component handles binLookup returning a panLength p
expect(panInputMaxLength).toEqual('24');
});

test('#3 Fill out PAN (binLookup w. panLength) see that focus moves to CVC since expiryDate is optional', async ({ card, page }) => {
test('#2 Fill out PAN & see that focus moves to CVC since expiryDate is optional', async ({ card, page }) => {
await binLookupMock(page, optionalDateWithPanLengthMock);

await card.goto(URL_MAP.card);
Expand All @@ -63,7 +65,7 @@ test.describe('Test how Card Component handles binLookup returning a panLength p
await expect(card.cvcLabelWithFocus).toBeVisible();
});

test('#4 Fill out PAN (binLookup w. panLength) see that focus moves to CVC since expiryDate is hidden', async ({ card, page }) => {
test('#3 Fill out PAN & see that focus moves to CVC since expiryDate is hidden', async ({ card, page }) => {
await binLookupMock(page, hiddenDateWithPanLengthMock);

await card.goto(URL_MAP.card);
Expand All @@ -77,10 +79,7 @@ test.describe('Test how Card Component handles binLookup returning a panLength p
await expect(card.cvcLabelWithFocus).toBeVisible();
});

test('#5 Fill out PAN (binLookup w. panLength) see that focus moves to holderName since expiryDate & cvc are optional', async ({
card,
page
}) => {
test('#4 Fill out PAN & see that focus moves to holderName since expiryDate & cvc are optional', async ({ card, page }) => {
await binLookupMock(page, optionalDateAndCvcWithPanLengthMock);

const componentConfig = { hasHolderName: true, holderNameRequired: true };
Expand All @@ -96,7 +95,7 @@ test.describe('Test how Card Component handles binLookup returning a panLength p
await expect(card.holderNameLabelWithFocus).toBeVisible();
});

test('#6 Fill out invalid date on an optional date field, then fill PAN (binLookup w. panLength) see that focus moves to (optional) expiryDate since expiryDate is in error', async ({
test('#5 Fill out invalid date on an optional date field, then fill & see that focus moves to (optional) expiryDate since expiryDate is in error', async ({
card,
page
}) => {
Expand All @@ -118,7 +117,7 @@ test.describe('Test how Card Component handles binLookup returning a panLength p
await expect(card.expiryDateLabelWithFocus).toBeVisible();
});

test('#7 Fill out PAN by **pasting** number (binLookup w. panLength) & see that maxLength is set on number SF and that focus moves to expiryDate', async ({
test('#6 Fill out PAN by **pasting** number & see that maxLength is set on number SF and that focus moves to expiryDate', async ({
card,
page
}) => {
Expand All @@ -143,7 +142,7 @@ test.describe('Test how Card Component handles binLookup returning a panLength p
});

test(
"#8 Fill out PAN with binLookup panLength of 18 and see that when you fill in the 16th digit the focus doesn't jump " +
"#7 Fill out PAN with binLookup panLength of 18 and see that when you fill in the 16th digit the focus doesn't jump " +
' then complete the number to 18 digits and see the focus jump' +
' then delete the number and add an amex one and see the focus now jumps after 15 digits',
async ({ card, page }) => {
Expand Down Expand Up @@ -193,7 +192,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 ({
test('#8 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
}) => {
await card.goto(URL_MAP.card);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ import { binLookupMock } from '../../../../../mocks/binLookup/binLookup.mock';
import { optionalDateAndCvcWithPanLengthMock } from '../../../../../mocks/binLookup/binLookup.data';
import { REGULAR_TEST_CARD } from '../../../../utils/constants';

test.describe('Test how Card Component handles binLookup returning a panLength property for a card with a social security number', () => {
test('#1 Fill out PAN (binLookup w. panLength) see that focus moves to social security number since expiryDate & cvc are optional', async ({
card,
page
}) => {
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 ({ card, page }) => {
await binLookupMock(page, optionalDateAndCvcWithPanLengthMock);

const componentConfig = { configuration: { socialSecurityNumberMode: 'show' } };
Expand Down

0 comments on commit edb9f47

Please sign in to comment.