import { describe, expect, it } from "vitest"; import { renderAppCss } from "../web/app.css"; import { renderAppHtml } from "../web/app.html"; import { renderThemeCss } from "../web/theme.css"; describe("ui Nugu theme", () => { it("emits semantic brutal variables and dark/light media query", () => { const css = renderThemeCss(); expect(css).toContain("--nugu-bg"); expect(css).toContain("--nugu-fg"); expect(css).toContain("--nugu-accent"); expect(css).toContain("prefers-color-scheme: light"); }); it("keeps stream-first layout without sidebar", () => { const css = renderThemeCss(); expect(css).toContain("grid-template-rows: auto minmax(0, 1fr) auto"); expect(css).not.toContain("sidebar"); }); it("keeps the composer visible while only the stream scrolls", () => { const css = renderAppCss(); expect(css).toContain( "body { margin: 0; min-height: 100vh; height: 100vh; overflow: hidden;", ); expect(css).toContain( "#ui-shell { min-height: 100vh; height: 100vh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;", ); expect(css).toContain("#ui-stream { min-height: 0;"); expect(css).toContain("#ui-bottom { position: sticky; bottom: 0;"); expect(css).toContain("#ui-input { width: 100%; max-height: 30vh;"); }); it("renders explicit progress and status regions", () => { const html = renderAppHtml(); const css = renderAppCss(); expect(html).toContain('id="ui-top"'); expect(html).toContain('id="ui-progress"'); expect(html).toContain('id="ui-meta"'); expect(html).toContain('id="ui-digest"'); expect(html).not.toContain("