Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

web: make real-time sync test more reliable

Abdullah Attac5fcc7e96212
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<T>(
) {
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[];
}