From eb78359b10c030ac61d27e2da793a53401214918 Mon Sep 17 00:00:00 2001 From: Jaybe Date: Sun, 7 Dec 2025 12:01:48 +0900 Subject: [PATCH] =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/unit/EditorFormBlocksStyle.spec.tsx | 18 +++++++++--------- tests/unit/formHelpers.spec.ts | 2 +- uploads/b5f8e467-6b83-4546-996a-9cd8cf09b6e9 | 1 + uploads/test-image-1765076338266 | 1 + uploads/test-section-bg-1765076338327 | 1 + uploads/test-section-bg-video-1765076338463 | 1 + uploads/test-video-1765076338445 | 1 + uploads/test-video-poster-1765076338270 | 1 + 8 files changed, 16 insertions(+), 10 deletions(-) create mode 100644 uploads/b5f8e467-6b83-4546-996a-9cd8cf09b6e9 create mode 100644 uploads/test-image-1765076338266 create mode 100644 uploads/test-section-bg-1765076338327 create mode 100644 uploads/test-section-bg-video-1765076338463 create mode 100644 uploads/test-video-1765076338445 create mode 100644 uploads/test-video-poster-1765076338270 diff --git a/tests/unit/EditorFormBlocksStyle.spec.tsx b/tests/unit/EditorFormBlocksStyle.spec.tsx index 3032b2b..d2d6a7f 100644 --- a/tests/unit/EditorFormBlocksStyle.spec.tsx +++ b/tests/unit/EditorFormBlocksStyle.spec.tsx @@ -246,7 +246,7 @@ describe("EditorPage - 폼 블록 스타일", () => { expect(select.style.backgroundColor).toBe(hexToRgb("#123456")); expect(select.style.borderColor).toBe(hexToRgb("#654321")); expect(select.style.width).toBe("260px"); - expect(select.style.borderRadius).toBe("9999px"); // lg → 9999 (에디터 구현 기준) + expect(select.style.borderRadius).toBe("6px"); // lg → 6 (Editor radius 스케일) }); it("formSelect: 기본 셀렉트 높이는 pb-select 와 동일한 padding(px-3/py-2)을 사용해야 한다", () => { @@ -303,14 +303,14 @@ describe("EditorPage - 폼 블록 스타일", () => { render(); const label = screen.getByText("라디오 그룹"); - const container = label.nextElementSibling as HTMLElement; // style 이 적용된 div + const groupContainer = label.closest("div") as HTMLElement; - expect(container).toBeTruthy(); - expect(container.style.color).toBe(hexToRgb("#ff0000")); - expect(container.style.backgroundColor).toBe(hexToRgb("#123456")); - expect(container.style.borderColor).toBe(hexToRgb("#654321")); - expect(container.style.width).toBe("280px"); - expect(container.style.borderRadius).toBe("9999px"); + expect(groupContainer).toBeTruthy(); + expect(groupContainer.style.color).toBe(hexToRgb("#ff0000")); + expect(groupContainer.style.backgroundColor).toBe(hexToRgb("#123456")); + expect(groupContainer.style.borderColor).toBe(hexToRgb("#654321")); + expect(groupContainer.style.width).toBe("280px"); + expect(groupContainer.style.borderRadius).toBe("6px"); }); it("formCheckbox: textColorCustom / fillColorCustom / strokeColorCustom / widthPx / borderRadius 가 에디터 렌더에 반영되어야 한다", () => { @@ -348,7 +348,7 @@ describe("EditorPage - 폼 블록 스타일", () => { expect(groupContainer.style.backgroundColor).toBe(hexToRgb("#123456")); expect(groupContainer.style.borderColor).toBe(hexToRgb("#654321")); expect(groupContainer.style.width).toBe("300px"); - expect(groupContainer.style.borderRadius).toBe("9999px"); + expect(groupContainer.style.borderRadius).toBe("6px"); }); it("formRadio: 그룹 타이틀 레이아웃이 inline 이면 에디터에서도 라벨과 필드 컨테이너가 가로 정렬되고 columnGap 이 labelGapPx 로 반영되어야 한다", () => { diff --git a/tests/unit/formHelpers.spec.ts b/tests/unit/formHelpers.spec.ts index b0d8beb..ad9727f 100644 --- a/tests/unit/formHelpers.spec.ts +++ b/tests/unit/formHelpers.spec.ts @@ -260,7 +260,7 @@ describe("formHelpers - editor tokens", () => { expect(tokens.fieldStyle.backgroundColor).toBe("#123456"); expect(tokens.fieldStyle.borderColor).toBe("#654321"); expect(tokens.fieldStyle.width).toBe("280px"); - expect(tokens.fieldStyle.borderRadius).toBe(9999); + expect(tokens.fieldStyle.borderRadius).toBe(6); expect(tokens.fieldStyle.paddingInline).toBe("8px"); expect(tokens.fieldStyle.paddingBlock).toBe("4px"); expect(tokens.fieldStyle.fontSize).toBe("15px"); diff --git a/uploads/b5f8e467-6b83-4546-996a-9cd8cf09b6e9 b/uploads/b5f8e467-6b83-4546-996a-9cd8cf09b6e9 new file mode 100644 index 0000000..87ccacf --- /dev/null +++ b/uploads/b5f8e467-6b83-4546-996a-9cd8cf09b6e9 @@ -0,0 +1 @@ +dummy-video \ No newline at end of file diff --git a/uploads/test-image-1765076338266 b/uploads/test-image-1765076338266 new file mode 100644 index 0000000..0cc5db2 --- /dev/null +++ b/uploads/test-image-1765076338266 @@ -0,0 +1 @@ +dummy-image \ No newline at end of file diff --git a/uploads/test-section-bg-1765076338327 b/uploads/test-section-bg-1765076338327 new file mode 100644 index 0000000..0cc5db2 --- /dev/null +++ b/uploads/test-section-bg-1765076338327 @@ -0,0 +1 @@ +dummy-image \ No newline at end of file diff --git a/uploads/test-section-bg-video-1765076338463 b/uploads/test-section-bg-video-1765076338463 new file mode 100644 index 0000000..badc796 --- /dev/null +++ b/uploads/test-section-bg-video-1765076338463 @@ -0,0 +1 @@ +dummy-section-video \ No newline at end of file diff --git a/uploads/test-video-1765076338445 b/uploads/test-video-1765076338445 new file mode 100644 index 0000000..87ccacf --- /dev/null +++ b/uploads/test-video-1765076338445 @@ -0,0 +1 @@ +dummy-video \ No newline at end of file diff --git a/uploads/test-video-poster-1765076338270 b/uploads/test-video-poster-1765076338270 new file mode 100644 index 0000000..7285c92 --- /dev/null +++ b/uploads/test-video-poster-1765076338270 @@ -0,0 +1 @@ +dummy-poster \ No newline at end of file