// @effect-diagnostics nodeBuiltinImport:off // Regression coverage compares the onboarding header with the shared titlebar contract. import * as NodeFS from "node:fs"; import { describe, expect, it } from "vite-plus/test"; describe("hosted static onboarding header", () => { it("uses the shared workspace topbar geometry", () => { const routeSource = NodeFS.readFileSync(new URL("./_chat.index.tsx", import.meta.url), "utf8"); const onboardingStart = routeSource.indexOf("function HostedStaticOnboardingState()"); const onboardingEnd = routeSource.indexOf('', onboardingStart); expect(onboardingStart).toBeGreaterThanOrEqual(0); expect(onboardingEnd).toBeGreaterThan(onboardingStart); const onboardingHeader = routeSource.slice(onboardingStart, onboardingEnd); expect(onboardingHeader).toContain("h-[var(--workspace-topbar-height)]"); expect(onboardingHeader).toContain("min-h-[var(--workspace-topbar-height)]"); expect(onboardingHeader).toContain("COLLAPSED_SIDEBAR_TITLEBAR_INSET_CLASS"); expect(onboardingHeader).not.toMatch(/(?:^|\s)(?:[\w-]+:)*py-/); }); });