From 177e85f9c3bc0a79ced72368476fc8fa0dcd22dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Wed, 11 Nov 2026 21:48:00 +0100 Subject: [PATCH] test(sheets): give the mocked sheet its dirty check The capture picker and the mood page import `sheetBodyHasUnsavedInput` from the sheet module now, and two tests that replace that module with a stub failed on the missing export. --- src/app/mood/__tests__/add-param-record-scope.test.tsx | 1 + src/components/layout/__tests__/capture-picker.test.tsx | 1 + 2 files changed, 2 insertions(+) diff --git a/src/app/mood/__tests__/add-param-record-scope.test.tsx b/src/app/mood/__tests__/add-param-record-scope.test.tsx index 684dc743c..147b68556 100644 --- a/src/app/mood/__tests__/add-param-record-scope.test.tsx +++ b/src/app/mood/__tests__/add-param-record-scope.test.tsx @@ -46,6 +46,7 @@ vi.mock("@/lib/i18n/context", () => ({ vi.mock("@/components/ui/responsive-sheet", () => ({ ResponsiveSheet: ({ open }: { open: boolean; children?: ReactNode }) => open ?
: null, + sheetBodyHasUnsavedInput: () => false, })); vi.mock("@/components/mood/mood-form", () => ({ MoodForm: () => null })); vi.mock("@/components/mood/mood-list", () => ({ MoodList: () => null })); diff --git a/src/components/layout/__tests__/capture-picker.test.tsx b/src/components/layout/__tests__/capture-picker.test.tsx index 694f57ec1..515a7f36c 100644 --- a/src/components/layout/__tests__/capture-picker.test.tsx +++ b/src/components/layout/__tests__/capture-picker.test.tsx @@ -33,6 +33,7 @@ vi.mock("@/components/ui/responsive-sheet", () => ({ open: boolean; children: React.ReactNode; }) => (open ?
{children}
: null), + sheetBodyHasUnsavedInput: () => false, })); vi.mock("@/components/dashboard/quick-entry-forms.lazy", () => ({