test: fix flaky on local-first-workspace-list.spec.ts (#2727)

This commit is contained in:
Himself65 authored and GitHub committed 2023-06-08 16:18:10 +08:00
1 parent 18dc427bc3
commit 27b14af388
5 files changed
+30 -30

No files matched your search

@@ -17,7 +17,7 @@ test('drag a page from "All pages" list onto the "Trash" folder in the sidebar t
// Drag-and-drop
// Ref: https://playwright.dev/docs/input#dragging-manually
await page.getByText('AFFiNE - not just a note taking app').hover();
await page.getByText('Untitled').hover();
await page.mouse.down();
await page.waitForTimeout(1000);
await page.getByText('Trash').hover();
@@ -29,7 +29,7 @@ test('drag a page from "All pages" list onto the "Trash" folder in the sidebar t
).toBeVisible();
await expect(
page.getByText('AFFiNE - not just a note taking app'),
page.getByText('Untitled'),
'The deleted post is no longer on the All Page list'
).toHaveCount(0);
@@ -37,7 +37,7 @@ test('drag a page from "All pages" list onto the "Trash" folder in the sidebar t
// Visit trash page via url
await page.getByText('Trash', { exact: true }).click();
await expect(
page.getByText('AFFiNE - not just a note taking app'),
page.getByText('Untitled'),
'The deleted post exists in the Trash list'
).toHaveCount(1);
});