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:
parent
df845ec610
commit
4ecb7a9300
1 changed files with 1 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue