test(clinician-share): start every case on an all-modules-on map

Two cases switch the doctor report off for the rest of their block, and
the blocks that did not set the map themselves inherited it under a
shuffled order, so a record share stopped aggregating.
This commit is contained in:
Marc-André Bombeck committed 2026-11-03 22:39:16 +01:00
1 parent 144840bab9
commit b975e86b39
1 file changed
+4
@@ -80,6 +80,7 @@ function ctx(overrides: Partial<ShareContext> = {}): ShareContext {
describe("loadShareViewData — KVNR default OFF", () => {
beforeEach(() => {
vi.clearAllMocks();
moduleMap.mockReset().mockResolvedValue(allModulesOn());
collect.mockResolvedValue({
patient: { displayName: "Shared record" },
});
@@ -216,6 +217,7 @@ describe("loadShareViewData — KVNR default OFF", () => {
describe("loadShareViewData — documents-only share exposes no health data", () => {
beforeEach(() => {
vi.clearAllMocks();
moduleMap.mockReset().mockResolvedValue(allModulesOn());
collect.mockResolvedValue({ patient: { displayName: "Shared record" } });
findDocs.mockResolvedValue([]);
});
@@ -296,6 +298,7 @@ describe("loadShareViewData — documents-only share exposes no health data", ()
describe("loadShareViewData — documentOnly column is authoritative", () => {
beforeEach(() => {
vi.clearAllMocks();
moduleMap.mockReset().mockResolvedValue(allModulesOn());
collect.mockResolvedValue({ patient: { displayName: "Shared record" } });
findDocs.mockResolvedValue([]);
});
@@ -339,6 +342,7 @@ describe("loadShareViewData — documentOnly column is authoritative", () => {
describe("loadShareViewData — the frozen scope reaches the aggregator intact", () => {
beforeEach(() => {
vi.clearAllMocks();
moduleMap.mockReset().mockResolvedValue(allModulesOn());
collect.mockResolvedValue({ patient: { displayName: "Shared record" } });
findDocs.mockResolvedValue([]);
});