Skip to content

Conversation

@BenHenning
Copy link
Collaborator

This will be merged without squashing.

maribethb and others added 4 commits September 17, 2025 10:31
…#745)

RaspberryPiFoundation/blockly#9384 revealed that one of the Block comment tests was a bit fragile in directly validating a specific node ID. Since node IDs can change if new elements on the page require a generated ID, the test could easily fail with changes to core Blockly.

This PR fixes the issue by using a regex check instead of a direct ID match. The 'comment_textarea' part is _probably_ sufficiently unique for the test to be considered correct (though it is possible for the wrong comment to be focused here, but it seems really unlikely with how simple the test is being set up and, if that actually happened, it's sort of incidentally still correct as there would be _some_ comment that has focus).

This PR also includes a number of attempts to improve test stability (particularly in CI):
- It introduces a CI-specific command that adds a 30 second Mocha test timeout to provide a lot more time for tests to fail (since CI tends to run on less performant machines than used for development).
- It introduces a synchronization between the Mocha timeout and the timeout used for WebdriverIO's `waitFor*` functions. Note that this actually will usually be 60 seconds regardless of the configured Mocha timeout due to the way the hook is set up. However, this is still far better than the 5 second default as at least 1 test seemed to fairly regularly fail against that limit.
- It adds a few missing 'wait' calls for helpers that are performing side effects which ensures better synchronization when using `PAUSE_TIME` (and possibly better stability when running in CI, too, though it's unclear of `pause()` actually does anything when the provided timeout is 0).
- See #745 (comment) attempts to further stabilize OS X tests only to yield that there are actual test failures.

This will be merged into the screen reader experimental branch to unblock the core Blockly PR as well.

#746 has been filed to track the discovered test failures.
@BenHenning BenHenning requested a review from a team as a code owner September 25, 2025 22:58
@BenHenning BenHenning requested review from RoboErikG and removed request for a team September 25, 2025 22:58
@BenHenning
Copy link
Collaborator Author

Conflict needs to be resolved so creating a separate branch for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants