TDD,E2E 개선, 미적용 스타일 개선
This commit is contained in:
@@ -61,6 +61,46 @@ describe("DividerPropertiesPanel", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("길이 모드 select 변경 시 updateBlock 이 widthMode 로 호출되어야 한다", () => {
|
||||
const updateBlock = vi.fn();
|
||||
|
||||
render(
|
||||
<DividerPropertiesPanel
|
||||
dividerProps={{ ...baseProps, widthMode: "full" }}
|
||||
selectedBlockId="divider-5"
|
||||
updateBlock={updateBlock}
|
||||
/>,
|
||||
);
|
||||
|
||||
const select = screen.getByLabelText("구분선 길이 모드");
|
||||
fireEvent.change(select, { target: { value: "fixed" } });
|
||||
|
||||
expect(updateBlock).toHaveBeenCalledWith(
|
||||
"divider-5",
|
||||
expect.objectContaining({ widthMode: "fixed" }),
|
||||
);
|
||||
});
|
||||
|
||||
it("고정 길이 (px) 커스텀 인풋 변경 시 updateBlock 이 widthPx 로 호출되어야 한다", () => {
|
||||
const updateBlock = vi.fn();
|
||||
|
||||
render(
|
||||
<DividerPropertiesPanel
|
||||
dividerProps={{ ...baseProps, widthMode: "fixed", widthPx: 320 }}
|
||||
selectedBlockId="divider-6"
|
||||
updateBlock={updateBlock}
|
||||
/>,
|
||||
);
|
||||
|
||||
const widthInput = screen.getByLabelText("고정 길이 (px) 커스텀 (px)");
|
||||
fireEvent.change(widthInput, { target: { value: "480" } });
|
||||
|
||||
expect(updateBlock).toHaveBeenCalledWith(
|
||||
"divider-6",
|
||||
expect.objectContaining({ widthPx: 480 }),
|
||||
);
|
||||
});
|
||||
|
||||
it("색상 HEX 인풋 변경 시 updateBlock 이 colorHex 로 호출되어야 한다", () => {
|
||||
const updateBlock = vi.fn();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user