test(desktop): isolate the consent dialog in preview-pane tests

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.
This commit is contained in:
Teknium
2026-09-01 00:30:18 -07:00
parent ada7213cca
commit b0d2148b43
@@ -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