Skip to content

Commit

Permalink
Make clipboard permissions browser specific
Browse files Browse the repository at this point in the history
  • Loading branch information
sponglord committed Nov 15, 2024
1 parent 3f68ee4 commit bc98055
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 5 additions & 1 deletion packages/e2e-playwright/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ const config: PlaywrightTestConfig = {
{
name: 'chromium',
use: {
...devices['Desktop Chrome']
...devices['Desktop Chrome'],
contextOptions: {
// chromium-specific permissions
permissions: ['clipboard-read', 'clipboard-write']
}
}
},

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,17 @@ test.describe('Test how Card Component handles binLookup returning a panLength p

await card.typeCardNumber(REGULAR_TEST_CARD);

await page.waitForTimeout(500);

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

// 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 ({
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 ({
card,
page,
context
page
}) => {
await context.grantPermissions(['clipboard-read', 'clipboard-write']);

await card.goto(URL_MAP.card);

await card.isComponentVisible();
Expand Down

0 comments on commit bc98055

Please sign in to comment.