test(e2e): Studio 화면 시험이 로그인 뒤 데이터가 그려진 다음 시작한다

signInToStudio는 로그인 뒤 Studio 머리말과 networkidle까지 기다린다. 그런데
mock Studio는 네트워크를 쓰지 않아 networkidle이 바로 오고, 화면은 그 뒤
약 0.3초 동안 aria-busy(데이터 로딩)였다가 본문을 그린다. 그래서 visual
「TECH_LOG_STUDIO_DOCUMENT_EDIT 360px」가 두 번 연속 로딩 상태(1000px)를
찍어, 다시 만든 기준(2077px)과 달라 떨어졌다.

main 안에 aria-busy가 없어질 때까지 기다린다.

검증: 로그인 뒤 100 ms마다 잰 값(chromium, 360px)에서 /studio,
/studio/documents, 편집 화면 모두 처음 세 번은 busy 1, 높이 1000이었고
네 번째부터 busy 0과 본문 높이가 됐다. 고친 뒤 test:visual 두 번 연속
132건 통과(PR 표).
This commit is contained in:
DongHyeonka
2026-11-12 18:38:30 +09:00
parent 40075c9afd
commit 4a39300941
@@ -151,6 +151,11 @@ export async function signInToStudio(page: Page) {
await page.locator("header.studio-header").waitFor();
await gate.waitFor({ state: "detached" });
await page.waitForLoadState("networkidle");
// The screen then loads its data (about 0.3 s, `aria-busy` while it does):
// a screenshot or a measurement taken before that sees the loading state.
await page.waitForFunction(
() => document.querySelector('main [aria-busy="true"]') === null,
);
}
/** `gotoTechLog` for a Studio route, signed in. */