TDD,E2E 개선, 미적용 스타일 개선
This commit is contained in:
@@ -17,6 +17,29 @@ describe("SectionPropertiesPanel", () => {
|
||||
cleanup();
|
||||
});
|
||||
|
||||
it("섹션 배경 색상 HEX 인풋 변경 시 updateBlock 이 backgroundColorCustom 으로 호출되어야 한다", () => {
|
||||
const updateBlock = vi.fn();
|
||||
|
||||
render(
|
||||
<SectionPropertiesPanel
|
||||
sectionProps={{
|
||||
...baseProps,
|
||||
backgroundColorCustom: "#111111",
|
||||
}}
|
||||
selectedBlockId="section-bg-1"
|
||||
updateBlock={updateBlock}
|
||||
/>,
|
||||
);
|
||||
|
||||
const hexInput = screen.getByLabelText("섹션 배경 색상 HEX 입력");
|
||||
fireEvent.change(hexInput, { target: { value: "#112233" } });
|
||||
|
||||
expect(updateBlock).toHaveBeenCalledWith(
|
||||
"section-bg-1",
|
||||
expect.objectContaining({ backgroundColorCustom: "#112233" }),
|
||||
);
|
||||
});
|
||||
|
||||
it("가로 위치 프리셋 드롭다운 변경 시 backgroundImagePositionXPercent 가 0/50/100 등으로 설정된다", () => {
|
||||
const updateBlock = vi.fn();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user