diff --git a/src/components/clinician/__tests__/clinician-view.test.tsx b/src/components/clinician/__tests__/clinician-view.test.tsx index 74dd4606e..f77f86bab 100644 --- a/src/components/clinician/__tests__/clinician-view.test.tsx +++ b/src/components/clinician/__tests__/clinician-view.test.tsx @@ -5,6 +5,7 @@ * carries the descriptive "not a clinical assessment / not a diagnosis" * disclaimer, the provenance header renders, and the view holds no app chrome. */ +import type React from "react"; import { describe, it, expect } from "vitest"; import { renderToStaticMarkup } from "react-dom/server"; @@ -59,7 +60,15 @@ function makeReport( } as DoctorReportData; } -function render(report: DoctorReportData) { +function render( + report: DoctorReportData, + extra?: Partial< + Pick< + React.ComponentProps, + "documents" | "token" | "locale" + > + >, +) { const { t } = getServerTranslator("en"); return renderToStaticMarkup( , ); } @@ -107,4 +117,70 @@ describe("", () => { expect(html).not.toContain('data-slot="sidebar"'); expect(html).not.toContain("coach"); }); + + it("renders no document section when the frozen set is empty", () => { + const html = render(makeReport(), { documents: [], token: "hls_abc" }); + expect(html).not.toContain("Documents"); + }); + + it("renders Class A inline: image → , PDF →