From 9cd1f013f84fd7582971ea8f164e8f1725a5521f Mon Sep 17 00:00:00 2001 From: 3720 Date: Wed, 5 Jul 2023 10:50:43 +0800 Subject: [PATCH] fix: flaky tests (#3019) --- tests/parallels/local-first-collections-items.spec.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/parallels/local-first-collections-items.spec.ts b/tests/parallels/local-first-collections-items.spec.ts index b1118fa8c6..f1306e6b8a 100644 --- a/tests/parallels/local-first-collections-items.spec.ts +++ b/tests/parallels/local-first-collections-items.spec.ts @@ -37,7 +37,9 @@ const createAndPinCollection = async ( await title.isVisible(); await title.fill(options?.collectionName ?? 'test collection'); await page.getByTestId('save-collection').click(); + await page.waitForTimeout(100); await page.getByTestId('collection-bar-option-pin').click(); + await page.waitForTimeout(100); }; test('Show collections items in sidebar', async ({ page }) => { await createAndPinCollection(page); @@ -82,6 +84,7 @@ test('pin and unpin collection', async ({ page }) => { }); await option.hover(); await option.getByTestId('collection-select-option-pin').click(); + await page.waitForTimeout(100); expect(await items.count()).toBe(1); }); @@ -99,6 +102,7 @@ test('edit collection', async ({ page }) => { const title = page.getByTestId('input-collection-title'); await title.fill('123'); await page.getByTestId('save-collection').click(); + await page.waitForTimeout(100); expect(await first.textContent()).toBe('123'); });