From c17900fbbef4915ae34dc7556a16798683e53e65 Mon Sep 17 00:00:00 2001 From: Adam Setch Date: Sun, 25 Oct 2026 09:53:04 -0400 Subject: [PATCH] test: raise the default timeout and quiet browser act warnings Give slower renderer tests a 10s budget instead of the 5s default. Mark the browser visual environment as non-act, since Playwright drives interactions outside React's act boundary; the unit projects keep the failing act-warning gate. --- src/renderer/__helpers__/visual.setup.ts | 2 ++ vitest.config.mts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/renderer/__helpers__/visual.setup.ts b/src/renderer/__helpers__/visual.setup.ts index fddd2c2bd..8869ec133 100644 --- a/src/renderer/__helpers__/visual.setup.ts +++ b/src/renderer/__helpers__/visual.setup.ts @@ -150,6 +150,8 @@ function disableAnimations(): void { } beforeEach(async () => { + // Interactions are driven by Playwright, outside React's act environment. + (globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = false; disableAnimations(); vi.useFakeTimers({ toFake: ['Date'], now: FIXED_NOW }); diff --git a/vitest.config.mts b/vitest.config.mts index 64053c25d..9bb5d306d 100644 --- a/vitest.config.mts +++ b/vitest.config.mts @@ -19,6 +19,7 @@ export default defineConfig({ globals: true, pool: 'vmThreads', isolate: true, + testTimeout: 10_000, clearMocks: true, unstubEnvs: true, unstubGlobals: true,