test(e2e): focus ring 시험이 첫 화면이 그려진 뒤에 링크에 포커스를 준다
app-shell의 focus ring 시험이 FE-GATE-008 전체 실행에서 WebKit만 한 번 실패했다. 「플랫폼 구성」 heading이 5초 안에 나오지 않았다(단독 실행에서는 세 엔진 모두 통과). 시험은 page.goto 직후 링크에 focus()를 주고 Enter를 누른다. 홈 라우트는 셸보다 늦게 그려지므로, 그 전에 준 포커스는 바뀐 노드와 함께 사라지고 Enter는 아무것도 하지 않는다. 고른 방법: 홈 heading이 그려진 것을 기다린 뒤 포커스를 주고, 링크가 포커스를 가졌는지 확인한 뒤 Enter를 누른다. 버린 대안: 재시도나 timeout 늘리기(원인을 덮는다). 검증: 고치기 전 시험을 WebKit에서 30번, 고친 시험을 세 엔진에서 30번씩 돌린 결과를 PR 본문에 적는다. Refs: 1112/05-02
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user