From 4ecb7a93008d50a5a618206857ec12548ba1f41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Wed, 25 Mar 2026 02:26:12 +0100 Subject: [PATCH] Fix E2E: use heading role for register page check "Register" appears 3 times on the page (heading, button text, link). Use getByRole("heading") to target the h1 specifically. Co-Authored-By: Claude Opus 4.6 (1M context) --- e2e/journal.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/journal.test.ts b/e2e/journal.test.ts index 08f99b3..b2863fa 100644 --- a/e2e/journal.test.ts +++ b/e2e/journal.test.ts @@ -15,7 +15,7 @@ test.describe("Journal", () => { test("registration page renders correctly", async ({ page }) => { await page.goto("/auth/register"); - await expect(page.getByText("Register")).toBeVisible(); + await expect(page.getByRole("heading", { name: "Register" })).toBeVisible(); await expect(page.getByLabel("Email")).toBeVisible(); await expect(page.getByLabel("Username")).toBeVisible(); await expect(page.getByRole("button", { name: /Register with Passkey/ })).toBeVisible();