test(e2e): 오래된 탭 시험이 새 화면의 h1을 기다린다

오래된 탭 시험은 A 빌드 탭에서 「프로젝트」를 누른 뒤
getByRole("heading", { name: "프로젝트" })가 보이면 다시 불러오기가 한 번
있었는지 센다. 그런데 탭이 아직 머물러 있는 홈 화면에도 h2 「프로젝트」가
있다. 그래서 A의 프로젝트 청크가 404가 나고 다시 불러오기가 시작되기 전에
조건이 맞고, 다시 불러오기 0번으로 떨어진다. 청크가 잘게 나뉜 뒤(부팅
실패 청크 수정) 다시 불러오기가 조금 늦어지면서 firefox·webkit에서
드러났다. PR #7에서 이 화면을 고를 때 이 h2를 보지 못했다.

새 화면의 h1을 기다린다.

검증: firefox trace에서 A의 route-tech-log-projects 청크가 404였고 그
뒤 release-manifest를 다시 받는 중이었다(다시 불러오기 직전). 고친 뒤
chromium·firefox·webkit에서 통과.
This commit is contained in:
DongHyeonka
2026-11-12 18:38:30 +09:00
parent c524a21463
commit 0dc11797a9
+5 -1
View File
@@ -107,7 +107,11 @@ test("an old tab reloads once into the new build, then stops reloading", async (
.getByRole("link", { name: PLATFORM.navigationLabel!, exact: true })
.click();
await expect(page.getByRole("heading", { name: PLATFORM.title })).toBeVisible();
// The page's h1: the home page the tab is still on has an h2 「프로젝트」
// of its own, which matched before the reload had happened.
await expect(
page.getByRole("heading", { level: 1, name: PLATFORM.title }),
).toBeVisible();
expect(loads).toBe(1);
const served = server.served.map((entry) => entry.path);
expect(served).not.toContain(aPlatform);