Skip to content

Commit a561781

Browse files
committed
fix: tests
1 parent 0bd4293 commit a561781

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

playwright.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ const config: PlaywrightTestConfig = {
3535
projects: [
3636
{
3737
name: 'chromium',
38-
use: {...devices['Desktop Chrome']},
38+
use: {
39+
...devices['Desktop Chrome'],
40+
contextOptions: {permissions: ['clipboard-read', 'clipboard-write']},
41+
},
3942
},
4043
{
4144
name: 'safari',

tests/utils/clipboard.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import type {Page} from '@playwright/test';
22

33
export const getClipboardContent = async (page: Page): Promise<string> => {
4-
await page.context().grantPermissions(['clipboard-read']);
5-
64
// First try the modern Clipboard API
75
const clipboardText = await page.evaluate(async () => {
86
try {

0 commit comments

Comments
 (0)