From b5285f0f65a90dacaf2780d541d189c64e1e1864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Mon, 19 Oct 2026 19:46:03 +0200 Subject: [PATCH] test(recovery): settle the connection status before reading the empty note The recovery page now holds its empty note until the integrations status has loaded. The data-gating test rendered without that status and saw the loading placeholder; it now seeds an account with no integrations, the settled answer the general note belongs to. Refs #1204 --- .../insights/__tests__/device-score-surfaces.test.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/insights/__tests__/device-score-surfaces.test.tsx b/src/components/insights/__tests__/device-score-surfaces.test.tsx index 5b26ba04a..e36b88076 100644 --- a/src/components/insights/__tests__/device-score-surfaces.test.tsx +++ b/src/components/insights/__tests__/device-score-surfaces.test.tsx @@ -3,6 +3,7 @@ import { renderToStaticMarkup } from "react-dom/server"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { I18nProvider } from "@/lib/i18n/context"; +import { queryKeys } from "@/lib/query-keys"; import type { DataSummary } from "@/lib/analytics/trends"; /** @@ -45,6 +46,12 @@ function render(node: React.ReactNode) { const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false, staleTime: Infinity } }, }); + // The recovery page's empty note waits for the connection status; an + // account with no integrations is the settled answer here. + queryClient.setQueryData(queryKeys.integrationsStatus(), { + threshold: 3, + integrations: [], + }); return renderToStaticMarkup( {node}