Skip to content

Commit

Permalink
Skip "paste" tet until it works in Firefox and Webkit
Browse files Browse the repository at this point in the history
  • Loading branch information
sponglord committed Nov 15, 2024
1 parent 46e1621 commit 3f68ee4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/e2e-playwright/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ const config: PlaywrightTestConfig = {
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
ignoreHTTPSErrors: true,
screenshot: 'only-on-failure',
permissions: ['clipboard-read', 'clipboard-write']
screenshot: 'only-on-failure'
},

/* Configure projects for major browsers */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,14 @@ 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 ({
// TODO - work out how to make clipboard-paste work in Firefox and Webkit (Safari)
test.skip('#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 ({
card,
page
page,
context
}) => {
await context.grantPermissions(['clipboard-read', 'clipboard-write']);

await card.goto(URL_MAP.card);

await card.isComponentVisible();
Expand All @@ -133,6 +137,8 @@ test.describe('Test how Card Component handles binLookup returning a panLength p
// Paste text from clipboard
await page.keyboard.press('Meta+V');

await page.waitForTimeout(500);

// Expect UI change - expiryDate field has focus
await expect(card.cardNumberLabelWithFocus).not.toBeVisible();
await expect(card.expiryDateLabelWithFocus).toBeVisible();
Expand Down

0 comments on commit 3f68ee4

Please sign in to comment.