테스트 오류 수정
This commit is contained in:
@@ -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 템플릿
|
||||
|
||||
Reference in New Issue
Block a user