테스트 오류 수정
CI / test (push) Successful in 5m23s
CI / e2e (push) Failing after 14m9s
CI / pr_and_merge (push) Has been skipped

This commit is contained in:
2025-12-13 16:41:37 +09:00
parent 0eed5a9f7a
commit 44c13a749a
5 changed files with 84 additions and 63 deletions
+15 -4
View File
@@ -44,17 +44,28 @@ async function setLocale(page: import("@playwright/test").Page, target: "EN" | "
const canvas = page.getByTestId("editor-canvas");
// 디버그: 현재 캔버스 텍스트 블록들의 내용을 로그로 출력한다.
// 디버그: 현재 캔버스 텍스트 블록들의 내용을 로그로 출력한다(플레이키 이슈 분석용).
const debugTexts = await canvas.getByTestId("editor-block").allInnerTexts();
// eslint-disable-next-line no-console
console.log("[CTA EN debug] block texts:", debugTexts);
await expect(canvas.getByText("Write a compelling CTA message here.")).toBeVisible();
await expect(canvas.getByRole("button", { name: "Call to action" })).toBeVisible();
// 실제 검증은 프리뷰 페이지에서 EN 기본 텍스트가 렌더되는지 기준으로 수행한다.
await Promise.all([
page.waitForURL(/\/preview/),
page.getByRole("link", { name: "Open preview" }).click(),
]);
await expect(page.getByRole("heading", { name: "Page Preview" })).toBeVisible();
// EN 기본 CTA 본문/버튼 텍스트가 프리뷰에 보여야 한다.
await expect(page.getByText("Write a compelling CTA message here.")).toBeVisible();
await expect(page.getByText("Call to action")).toBeVisible();
// KO 기본 CTA 텍스트/버튼은 프리뷰에 나타나지 않아야 한다.
await expect(
canvas.getByText("지금 바로 행동을 유도하는 CTA 텍스트를 입력하세요.", { exact: false }),
page.getByText("지금 바로 행동을 유도하는 CTA 텍스트를 입력하세요.", { exact: false }),
).toHaveCount(0);
await expect(page.getByText("CTA 버튼")).toHaveCount(0);
});
// KO 로케일 기준 CTA 템플릿