diff --git a/tests/e2e/app-shell.spec.ts b/tests/e2e/app-shell.spec.ts index 5f94dd73..c49dcb5c 100644 --- a/tests/e2e/app-shell.spec.ts +++ b/tests/e2e/app-shell.spec.ts @@ -30,10 +30,14 @@ test("shows the focus ring on the route heading after keyboard navigation only", page, }) => { await page.goto("/"); + // The home route renders after the shell: focus given before it is there + // goes with the node it lands on, and Enter then does nothing (WebKit). + await expect(page.getByRole("heading", { level: 1 })).toHaveText("Clean Architecture Frontend"); const link = page .getByRole("navigation", { name: "주요 탐색" }) .getByRole("link", { name: "플랫폼 구성" }); await link.focus(); + await expect(link).toBeFocused(); await page.keyboard.press("Enter"); const heading = page.getByRole("heading", { level: 1, name: "플랫폼 구성" }); await expect(heading).toBeFocused();