Conversation
Firefox pages opened in the same browser share focus and mouse states: a mouse event raises the window of its page, blurring the focused element of other pages, and ends pointer captures in other pages. Launch a separate browser for each Firefox test session so test files can run in parallel, remove `fileParallelism: false`, and set `maxWorkers: 8`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes
fileParallelism: falsefrom the Firefox browser instance.Vitest runs parallel test files as pages of the same browser, but Firefox pages opened in the same browser share focus and mouse states, so test files interfere with each other:
document.hasFocus()returnsfalsein their iframes, editors close, etc.pointermove/pointerupto the pointer capture target of other pages, ending ongoing drags (column resize, drag fill).With file parallelism enabled, 149/177 Firefox tests failed.
Changes:
PlaywrightBrowserPerSessionProvider, which extends Vitest's Playwright provider: every session after the first one gets its own browser. It creates the session's context in a new browser before callingopenPage(), and the base provider reuses that context.fileParallelism: falsefrom the Firefox instancemaxWorkers: 8Notes:
fileParallelism: falsealso made Vitest run Firefox test files after the other browsers' tests. Firefox now runs at the same time as Chromium and WebKit.node --run testwent from ~60s to ~24s.🤖 Generated with Claude Code