From c5fcc7e962122eb8a391a287da025d75f14e4232 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Wed, 23 Nov 2022 16:21:56 +0500 Subject: [PATCH] web: make real-time sync test more reliable --- apps/web/__e2e__/sync.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/web/__e2e__/sync.test.ts b/apps/web/__e2e__/sync.test.ts index ddf51918c..a685fd054 100644 --- a/apps/web/__e2e__/sync.test.ts +++ b/apps/web/__e2e__/sync.test.ts @@ -39,9 +39,10 @@ async function actAndSync( ) { const results = await Promise.all([ ...actions.filter((a) => !!a), - ...devices.map((d) => d.waitForSync("synced", "now")), - ...devices.map((d) => d.page.waitForTimeout(1000)) + ...devices.map((d) => d.waitForSync("synced", "now")) ]); + + await Promise.all(devices.map((d) => d.page.waitForTimeout(2000))); return results.slice(0, actions.length) as T[]; }