Skip to content

Commit

Permalink
fix: reduce Firefox's concurrency to 1 to avoid unreliable focus
Browse files Browse the repository at this point in the history
  • Loading branch information
dlockhart committed Jun 21, 2023
1 parent 7101f53 commit df23e07
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/server/wtr-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ export class WTRConfig {
if (!Array.isArray(browsers)) throw new TypeError('browsers must be an array');

return browsers.map((b) => playwrightLauncher({
concurrency: b === 'firefox' ? 1 : undefined, // focus in Firefox unreliable if concurrency > 1 (https://github.com/modernweb-dev/web/issues/238)
product: b,
createBrowserContext: ({ browser }) => browser.newContext({ deviceScaleFactor: 2, reducedMotion: 'reduce' })
}));
Expand Down

0 comments on commit df23e07

Please sign in to comment.