test: add mutex to clipboard copy & paste operation to reduce flaky (#11884)

This commit is contained in:
Brooooooklyn
2025-04-22 11:02:29 +00:00
parent 4fd468c46f
commit bfd3c64615
10 changed files with 32 additions and 28 deletions

View File

@@ -515,8 +515,6 @@ test('can paste a doc link to create link reference', async ({ page }) => {
// paste the url
await writeTextToClipboard(page, url);
// check the link reference
await page.waitForTimeout(500);
await expect(
page.locator('affine-reference:has-text("Getting Started")')
).toBeVisible();
@@ -524,8 +522,6 @@ test('can paste a doc link to create link reference', async ({ page }) => {
// can ctrl-z to revert to normal link
await page.keyboard.press('ControlOrMeta+z');
// check the normal link
await page.waitForTimeout(500);
await expect(page.locator(`affine-link:has-text("${url}")`)).toBeVisible();
});