Skip to content

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

web: fix `unlock a note for editing` test

Abdullah Atta8a16ef9b8535
diff --git a/apps/web/__e2e__/notes.test.ts b/apps/web/__e2e__/notes.test.ts
index 3fc253954..6d9612537 100644
--- a/apps/web/__e2e__/notes.test.ts
+++ b/apps/web/__e2e__/notes.test.ts
@@ -259,14 +259,15 @@ test("unlock a note for editing", async ({ page }) => {
await page.waitForTimeout(150);
await page.reload();
- await page.waitForTimeout(500);
+ await notes.waitForList();
const newContent = `${NOTE.content}${content}`;
const editedNote = await notes.findNote({
title: NOTE.title,
content: newContent
});
- await editedNote?.openLockedNote(PASSWORD);
+ if (!editedNote) throw new Error("Could not find note.");
+ await editedNote.openLockedNote(PASSWORD);
await notes.editor.waitForLoading();
expect(await notes.editor.getContent("text")).toContain(newContent);
});