e2e 오류 수정
CI / test (push) Successful in 5m28s
CI / e2e (push) Failing after 14m38s
CI / pr_and_merge (push) Has been skipped

This commit is contained in:
2025-12-14 14:59:12 +09:00
parent 44c13a749a
commit d7ebc82e2a
2 changed files with 17 additions and 0 deletions
+12
View File
@@ -19,7 +19,16 @@ async function setLocale(page: import("@playwright/test").Page, target: "EN" | "
// 프리뷰 E2E에서도 기본적으로 로그인된 사용자를 가정한다.
// /editor 와 /preview 모두 auth 가드가 /api/auth/me 를 호출하므로, 200 으로 목 처리해 리다이렉트를 막는다.
// 또한 테스트 간 autosave 스냅샷 및 기타 localStorage 상태가 섞이지 않도록, 각 테스트 진입 전에 localStorage 를 초기화한다.
test.beforeEach(async ({ page }) => {
await page.addInitScript(() => {
try {
window.localStorage.clear();
} catch {
// localStorage 접근 실패는 테스트 진행에 치명적이지 않으므로 조용히 무시한다.
}
});
await page.route("**/api/auth/me", async (route) => {
await route.fulfill({
status: 200,
@@ -380,6 +389,9 @@ test("폼 라디오 옵션 라벨 이미지 업로드 후 에디터/프리뷰
await page.getByRole("button", { name: "Radio group" }).click();
const canvas = page.getByTestId("editor-canvas");
const blocks = canvas.getByTestId("editor-block");
await blocks.last().click({ force: true });
const propertiesSidebar = page.getByTestId("properties-sidebar");
const firstOptionLabel = propertiesSidebar.getByPlaceholder("Label").first();