테마 적용
This commit is contained in:
@@ -134,4 +134,16 @@ describe("PreviewPage - canvasPreset / canvasWidthPx", () => {
|
||||
expect(inner.style.backgroundColor).toBe("rgb(17, 17, 17)");
|
||||
expect(main.style.backgroundColor).toBe("rgb(34, 34, 34)");
|
||||
});
|
||||
|
||||
it("bodyBgColorHex 가 빈 문자열이면 PreviewPage main 에 background-color 가 들어가지 않아야 한다", () => {
|
||||
mockState.projectConfig = {
|
||||
...(mockState.projectConfig as ProjectConfig),
|
||||
bodyBgColorHex: "",
|
||||
} as ProjectConfig;
|
||||
|
||||
const { container } = render(<PreviewPage />);
|
||||
const main = container.querySelector("main") as HTMLElement;
|
||||
// 명시적으로 빈 문자열을 지정한 경우에는 PreviewPage 가 어떤 기본 배경색도 강제로 설정하지 않아야 한다.
|
||||
expect(main.style.backgroundColor).toBe("");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user