Skip to content

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

web: use unique note during sync tests

Abdullah Attaaf1cfc92c220
diff --git a/apps/web/__e2e__/sync.test.ts b/apps/web/__e2e__/sync.test.ts
index cf3de8672..d37d7e5a4 100644
--- a/apps/web/__e2e__/sync.test.ts
+++ b/apps/web/__e2e__/sync.test.ts
@@ -49,7 +49,7 @@ async function actAndSync<T>(
}
const NOTE = {
- title: "Real-time sync test note 1"
+ title: `Note ${makeid(20)}`
};
test(`edits in a note opened on 2 devices should sync in real-time`, async ({
@@ -66,9 +66,9 @@ test(`edits in a note opened on 2 devices should sync in real-time`, async ({
const [notesA, notesB] = await Promise.all(
[deviceA, deviceB].map((d) => d.goToNotes())
);
- const noteB =
- (await notesB.findNote(NOTE)) ||
- (await actAndSync([deviceA, deviceB], notesB.createNote(NOTE)))[0];
+ const noteB = (
+ await actAndSync([deviceA, deviceB], notesB.createNote(NOTE))
+ )[0];
const noteA = await notesA.findNote(NOTE);
await Promise.all([noteA, noteB].map((note) => note?.openNote()));