Skip to content

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

web: fix tests

Abdullah Atta9195244890e5
diff --git a/apps/web/__e2e__/editor.test.ts-snapshots/readonly-edited-note-Chromium-linux.txt b/apps/web/__e2e__/editor.test.ts-snapshots/readonly-edited-note-Chromium-linux.txt
index 8fdeb8f1c..c3b87e7de 100644
--- a/apps/web/__e2e__/editor.test.ts-snapshots/readonly-edited-note-Chromium-linux.txt
+++ b/apps/web/__e2e__/editor.test.ts-snapshots/readonly-edited-note-Chromium-linux.txt
@@ -1 +1 @@
-An edit I madeThis is Test 1Test 1Test 1Test 1Test 1Test 1Test 1Test 1Test 1Test 1
\ No newline at end of file
+This is Test 1Test 1Test 1Test 1Test 1Test 1Test 1Test 1Test 1Test 1An edit I made
\ No newline at end of file
diff --git a/apps/web/__e2e__/keyboard-list-navigation.test.ts b/apps/web/__e2e__/keyboard-list-navigation.test.ts
index 27388b5da..c7555f590 100644
--- a/apps/web/__e2e__/keyboard-list-navigation.test.ts
+++ b/apps/web/__e2e__/keyboard-list-navigation.test.ts
@@ -262,7 +262,7 @@ test("using Shift+Click when no notes are selected should not crash the app", as
info.setTimeout(60 * 1000);
const { notes } = await populateList(page, 5);
- await page.reload();
+ await notes.focus();
const note = await notes.findNote({ title: "Test note 3" });
diff --git a/apps/web/__e2e__/notes.test.ts b/apps/web/__e2e__/notes.test.ts
index 29cca30f0..3fc253954 100644
--- a/apps/web/__e2e__/notes.test.ts
+++ b/apps/web/__e2e__/notes.test.ts
@@ -284,11 +284,9 @@ test("change title of a locked note", async ({ page }) => {
await page.waitForTimeout(150);
await page.reload();
- await page.waitForTimeout(500);
-
- const editedNote = await notes.findNote({ title, content: NOTE.content });
+ await notes.waitForList();
+ const editedNote = await notes.findNote({ title });
await editedNote?.openLockedNote(PASSWORD);
- await notes.editor.waitForLoading();
expect(await note?.getTitle()).toContain(title);
expect(await notes.editor.getTitle()).toContain(title);
});
diff --git a/apps/web/__e2e__/notes.test.ts-snapshots/export-html-Chromium-linux.txt b/apps/web/__e2e__/notes.test.ts-snapshots/export-html-Chromium-linux.txt
index d89b3634c..ed3cf07db 100644
--- a/apps/web/__e2e__/notes.test.ts-snapshots/export-html-Chromium-linux.txt
+++ b/apps/web/__e2e__/notes.test.ts-snapshots/export-html-Chromium-linux.txt
@@ -17,12 +17,25 @@
<link rel="stylesheet" href="https://app.notesnook.com/assets/editor-styles.css?d=0">
<style>
- img {
- max-width: 100% !important;
- height: auto !important;
- border-radius: 5px;
+
+ .image-container {
+ display: block;
}
-
+ .image-container.align-right {
+ display: flex;
+ justify-content: end;
+ }
+ .image-container.align-center {
+ display: flex;
+ justify-content: center;
+ }
+ .image-container.float {
+ float: left;
+ }
+ .image-container.float.align-right {
+ float: right;
+ }
+
body {
background-color: transparent !important;
color: #202124;
@@ -166,6 +179,6 @@
</head>
<body>
<h1>Test 1</h1>
- <p data-spacing="double">This is Test 1Test 1Test 1Test 1Test 1Test 1Test 1Test 1Test 1Test 1</p>
+ <p data-block-id="xxx" data-spacing="double">This is Test 1Test 1Test 1Test 1Test 1Test 1Test 1Test 1Test 1Test 1</p>
</body>
</html>