From b30164ef66e90fc2b19d7d96e6027d803a685673 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Mon, 13 Jan 2025 10:00:13 +0200 Subject: [PATCH] chore(e2e): add missing await to expect --- e2e/note_types/code.spec.ts | 2 +- e2e/note_types/mermaid.spec.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/e2e/note_types/code.spec.ts b/e2e/note_types/code.spec.ts index 6473b6849..f0f204fcc 100644 --- a/e2e/note_types/code.spec.ts +++ b/e2e/note_types/code.spec.ts @@ -10,7 +10,7 @@ test("Displays lint warnings for backend script", async ({ page, context }) => { const codeEditor = app.currentNoteSplit.locator(".CodeMirror"); // Expect two warning signs in the gutter. - expect(codeEditor.locator(".CodeMirror-gutter-wrapper .CodeMirror-lint-marker-warning")).toHaveCount(2); + await expect(codeEditor.locator(".CodeMirror-gutter-wrapper .CodeMirror-lint-marker-warning")).toHaveCount(2); // Hover over hello await codeEditor.getByText("hello").first().hover(); diff --git a/e2e/note_types/mermaid.spec.ts b/e2e/note_types/mermaid.spec.ts index 23f43399e..b06076cc3 100644 --- a/e2e/note_types/mermaid.spec.ts +++ b/e2e/note_types/mermaid.spec.ts @@ -6,9 +6,9 @@ test("displays simple map", async ({ page, context }) => { await app.goto(); await app.goToNoteInNewTab("Sample mindmap"); - expect(app.currentNoteSplit).toContainText("Hello world"); - expect(app.currentNoteSplit).toContainText("1"); - expect(app.currentNoteSplit).toContainText("1a"); + await expect(app.currentNoteSplit).toContainText("Hello world"); + await expect(app.currentNoteSplit).toContainText("1"); + await expect(app.currentNoteSplit).toContainText("1a"); }); test("displays note settings", async ({ page, context }) => { @@ -18,5 +18,5 @@ test("displays note settings", async ({ page, context }) => { await app.currentNoteSplit.getByText("Hello world").click({ force: true }); const nodeMenu = app.currentNoteSplit.locator(".node-menu"); - expect(nodeMenu).toBeVisible(); + await expect(nodeMenu).toBeVisible(); });