From b0d2148b437decfb060c03c82fc20777bc84aac8 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Tue, 1 Sep 2026 00:30:18 -0700 Subject: [PATCH] test(desktop): isolate the consent dialog in preview-pane tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pane now mounts RealProfileConsentDialog, whose config hook needs a QueryClientProvider the pane tests don't set up. Mock it out like the pane's other collaborators — the dialog has its own test file. --- apps/desktop/src/app/chat/right-rail/preview-pane.test.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/desktop/src/app/chat/right-rail/preview-pane.test.tsx b/apps/desktop/src/app/chat/right-rail/preview-pane.test.tsx index cac9d8cc22..3fbc793d03 100644 --- a/apps/desktop/src/app/chat/right-rail/preview-pane.test.tsx +++ b/apps/desktop/src/app/chat/right-rail/preview-pane.test.tsx @@ -7,6 +7,13 @@ import { $connection, $selectedStoredSessionId } from '@/store/session' import { forgetPreviewConsole, previewConsoleState } from './preview-console-store' import { PreviewPane } from './preview-pane' +// The consent dialog has its own test file and needs a QueryClientProvider; +// these tests exercise the pane's console/watch/webview wiring, not the +// prompt, so isolate it the way the pane's other collaborators are. +vi.mock('./real-profile-consent-dialog', () => ({ + RealProfileConsentDialog: () => null +})) + function stubPdfObjectUrls() { const NativeUrl = URL let objectUrlIndex = 0