From 83d92af07d9946cb9ecd6aa0a101114a8f9d9d23 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Sat, 8 Jul 2023 14:30:17 +0800 Subject: [PATCH] test: fix flaky (#3100) (cherry picked from commit c4d53d59b52f63828f669555834898b09e72f6f8) --- tests/parallels/local-first-collections-items.spec.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/parallels/local-first-collections-items.spec.ts b/tests/parallels/local-first-collections-items.spec.ts index c70278d637..f769574baf 100644 --- a/tests/parallels/local-first-collections-items.spec.ts +++ b/tests/parallels/local-first-collections-items.spec.ts @@ -63,6 +63,7 @@ test('Show collections items in sidebar', async ({ page }) => { .getByTestId('collection-option') .getByText('Delete'); await deleteCollection.click(); + await page.waitForTimeout(50); expect(await items.count()).toBe(0); }); @@ -71,6 +72,7 @@ test('pin and unpin collection', async ({ page }) => { await createAndPinCollection(page, { collectionName: name }); const collections = page.getByTestId('collections'); const items = collections.getByTestId('collection-item'); + await page.waitForTimeout(50); expect(await items.count()).toBe(1); const first = items.first(); await first.getByTestId('collection-options').click(); @@ -78,6 +80,7 @@ test('pin and unpin collection', async ({ page }) => { .getByTestId('collection-option') .getByText('Unpin'); await deleteCollection.click(); + await page.waitForTimeout(50); expect(await items.count()).toBe(0); await page.getByTestId('collection-select').click(); const option = page.locator('[data-testid=collection-select-option]', {