fix(site): disable refetchInterval in storybook QueryClient (#23585)

HealthLayout sets refetchInterval: 30_000 on its health query.
In storybook tests, the seeded cache data prevents the initial
fetch, but interval polling still fires after 30s, hitting the
Vite proxy with no backend. This caused test-storybook to hang
indefinitely in environments without a running coderd.

Set refetchInterval: false in the storybook QueryClient defaults
alongside the existing staleTime: Infinity and retry: false.
This commit is contained in:
Mathias Fredriksson
2026-03-25 17:37:53 +02:00
committed by GitHub
parent 398e2d3d8a
commit 239520f912
+1
View File
@@ -66,6 +66,7 @@ const withQuery: Decorator = (Story, { parameters }) => {
defaultOptions: {
queries: {
staleTime: Number.POSITIVE_INFINITY,
refetchInterval: false,
retry: false,
},
},