fix: apply authored presentation stage themes

This commit is contained in:
lda
2026-07-11 09:46:40 +07:00 Verified
parent 3587bc3fb7
commit 579bb96f03
5 changed files with 51 additions and 5 deletions
@@ -17,10 +17,17 @@ describe("PresentationCanvas", () => {
const canvas = screen.getByTestId("presentation-canvas");
expect(canvas).toHaveClass("presentation-canvas");
expect(canvas).toHaveAttribute("data-stage-theme", "paper");
expect(canvas.style.transform).toBe("");
expect(canvas).toHaveTextContent("Scene");
});
it("applies the authored night stage theme without changing canvas geometry", () => {
render(<PresentationCanvas stageTheme="night"><div>Scene</div></PresentationCanvas>);
expect(screen.getByTestId("presentation-canvas")).toHaveAttribute("data-stage-theme", "night");
});
it("uses CSS ratio bounds instead of JavaScript scale calculations", () => {
expect(editorialCss).toContain("width: min(100dvw, calc(100dvh * 16 / 9))");
expect(editorialCss).toContain("height: min(100dvh, calc(100dvw * 9 / 12))");