mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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:
@@ -66,6 +66,7 @@ const withQuery: Decorator = (Story, { parameters }) => {
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
staleTime: Number.POSITIVE_INFINITY,
|
||||
refetchInterval: false,
|
||||
retry: false,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user