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) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-03-25 02:26:12 +01:00 committed by GitHub
parent df845ec610
commit 4ecb7a9300

View file

@ -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();