From 818ca2c2abafb056a3d1c3163458c0e6c0583598 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 22 Feb 2026 18:54:51 +0200 Subject: [PATCH] e2e(server): fix flaky test --- apps/server-e2e/src/duplicate.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/server-e2e/src/duplicate.spec.ts b/apps/server-e2e/src/duplicate.spec.ts index 56c1709605..b7ca06aacd 100644 --- a/apps/server-e2e/src/duplicate.spec.ts +++ b/apps/server-e2e/src/duplicate.spec.ts @@ -9,6 +9,8 @@ test("Can duplicate note with broken links", async ({ page, context }) => { await app.noteTree.getByText("Note map").first().click({ button: "right" }); await page.locator("#context-menu-container").getByText("Duplicate").click(); - await expect(page.locator(".toast-body")).toBeHidden(); - await expect(app.noteTree.getByText("Note map (dup)")).toBeVisible(); + await expect(page.locator(".toast-body", { + hasText: `Note "Note map" has been` + })).toBeHidden(); + await expect(app.noteTree.getByText("Note map (dup)").first()).toBeVisible(); });