텍스트/버튼/이미지/섹션 블록 타입 확장 및 에디터 UI 연동

This commit is contained in:
2025-11-18 06:26:02 +09:00
parent 4b00e9a3f9
commit d21252eb1f
4 changed files with 474 additions and 98 deletions
+24
View File
@@ -229,3 +229,27 @@ test("블록 드래그앤드롭으로 순서를 변경할 수 있어야 한다",
await expect(reorderedBlocks.nth(0)).toContainText("블록 B");
await expect(reorderedBlocks.nth(1)).toContainText("블록 A");
});
test("버튼 블록을 추가하고 라벨과 링크를 수정할 수 있어야 한다", async ({ page }) => {
await page.goto("/editor");
const canvas = page.getByTestId("editor-canvas");
// 버튼 블록을 추가한다.
await page.getByRole("button", { name: "버튼 블록 추가" }).click();
// 캔버스에 기본 버튼이 렌더되어야 한다.
const button = canvas.getByRole("button", { name: "버튼" });
await expect(button).toBeVisible();
// 속성 패널에서 버튼 텍스트와 링크를 수정한다.
const labelInput = page.getByRole("textbox", { name: "버튼 텍스트" });
const hrefInput = page.getByRole("textbox", { name: "버튼 링크" });
await labelInput.fill("자세히 보기");
await hrefInput.fill("https://example.com");
// 캔버스의 버튼 텍스트가 변경되어야 한다.
const updatedButton = canvas.getByRole("button", { name: "자세히 보기" });
await expect(updatedButton).toBeVisible();
});