Skip to content

Conversation

@gonfunko
Copy link
Contributor

The basics

The details

Resolves

Fixes #8937

Proposed Changes

This PR uses the Chrome devtools "Emulate a focused page" option to make the window that the Mocha tests run in always behave as if it is focused, regardless of whether or not it actually does in the window manager/OS. This makes the test environment more consistent and prevents intermittent flakes based on the window having focus or not. Additionally, the test:mocha:interactive command has been updated to use the same Gulp codepath as the test command; previously, it just opened a window, but didn't run the code that configured Webdriver/Chrome options.

@gonfunko gonfunko requested a review from a team as a code owner August 26, 2025 22:11
@gonfunko gonfunko requested a review from cpcallen August 26, 2025 22:11
@github-actions github-actions bot added the PR: fix Fixes a bug label Aug 26, 2025
@gonfunko gonfunko merged commit b2bbe96 into develop Aug 27, 2025
16 of 18 checks passed
@gonfunko gonfunko deleted the mocha-focus branch August 27, 2025 19:28
gonfunko added a commit that referenced this pull request Aug 28, 2025
…9332)

* chore: Add puppeteer-core as a dev dependency.

* fix: Make mocha tests run in a fake-focused window.

* fix: Make `test:mocha:interactive` use the same gulp codepath as `test`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: fix Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mocha tests fail when browser window is not foreground window

3 participants