From 7b023df073a62b6cd67b1610907deffdbc7aecef Mon Sep 17 00:00:00 2001 From: Taro Shono Date: Sat, 26 Oct 2024 00:05:02 +0900 Subject: [PATCH] fix: permission --- .../__tests__/e2e/Links.spec.mjs | 55 ++++++++++--------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/packages/lexical-playground/__tests__/e2e/Links.spec.mjs b/packages/lexical-playground/__tests__/e2e/Links.spec.mjs index 5bea621a7c9..d0db3462c25 100644 --- a/packages/lexical-playground/__tests__/e2e/Links.spec.mjs +++ b/packages/lexical-playground/__tests__/e2e/Links.spec.mjs @@ -2086,33 +2086,36 @@ test.describe('Link attributes', () => { page, context, hasLinkAttributes, + browserName, }) => { - await focusEditor(page); - await page.keyboard.type('Hello awesome'); - await focusEditor(page); - await selectAll(page); - await context.grantPermissions(['clipboard-read', 'clipboard-write']); - await page.evaluate(() => - navigator.clipboard.writeText('https://facebook.com'), - ); - await paste(page); - await assertHTML( - page, - html` -

- - Hello awesome - -

- `, - ); + if (browserName === 'chromium') { + await focusEditor(page); + await page.keyboard.type('Hello awesome'); + await focusEditor(page); + await selectAll(page); + await context.grantPermissions(['clipboard-read', 'clipboard-write']); + await page.evaluate(() => + navigator.clipboard.writeText('https://facebook.com'), + ); + await paste(page); + await assertHTML( + page, + html` +

+ + Hello awesome + +

+ `, + ); + } }); });