From e2d308ec31930c2634977d44b7d4c1c8d549bbc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Thu, 6 Aug 2026 04:53:28 +0200 Subject: [PATCH] test: cover read-only profile summary - Render bounded profile details\n- Exclude profile mutation controls --- .../__tests__/profile-summary.test.tsx | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/components/records/__tests__/profile-summary.test.tsx diff --git a/src/components/records/__tests__/profile-summary.test.tsx b/src/components/records/__tests__/profile-summary.test.tsx new file mode 100644 index 000000000..999805e0e --- /dev/null +++ b/src/components/records/__tests__/profile-summary.test.tsx @@ -0,0 +1,30 @@ +import { describe, expect, it } from "vitest"; +import { renderToStaticMarkup } from "react-dom/server"; + +import { I18nProvider } from "@/lib/i18n/context"; +import { ProfileSummary } from "../profile-summary"; + +describe("ProfileSummary", () => { + it("renders bounded profile information without mutation controls", () => { + const html = renderToStaticMarkup( + + + , + ); + + expect(html).toContain('data-slot="profile-summary"'); + expect(html).toContain("Pollen"); + expect(html).toContain("Hypertension"); + expect(html).toContain("Smoking"); + expect(html).not.toContain("