[wip] testing flakiness of firefox/chrome tests in GHA#4936
Closed
[wip] testing flakiness of firefox/chrome tests in GHA#4936
Conversation
… previous pr runs
Co-authored-by: Dan Bjorge <dan.bjorge@deque.com>
dbjorge
added a commit
that referenced
this pull request
Nov 12, 2025
#4938) In #4919, we found that the `test_firefox` job was unacceptably flaky in the `preload-cssom` tests. I believe this is because the GHA runners are slightly more resource-constrained than the circleci ones, which broke an assumption in `axe.testUtils.addStyleSheet` that adding a `<style>` element would result in `document.styleSheets` being updated accordingly within 100ms (in Chrome this happens instantly, but in Firefox there is a delay). I updated the test util to poll until it actually *sees* `document.styleSheets` update as expected, and to reject with a more actionable error if a timeout occurs (rather than letting a test run in an unexpected state). This also has a minor side-benefit of making the tests marginally faster on Chrome, since they no longer wait 100ms-per-injected-sheet unnecessarily. You can see the results of this in #4936 - the preload-cssom test_firefox case [only passed 6/10 runs without this fix](https://github.com/dequelabs/axe-core/pull/4936/checks?sha=1516bacef0b7e039030adbd4d55c1a627f9899fb) and [passed 10/10 runs with this fix](https://github.com/dequelabs/axe-core/pull/4936/checks?sha=339c2580bb82f2f7833b8e2447bfeff92354350e). The updates in `preload-cssom.js` turned out to be unnecessary to fix the issue, but they make errors in the test more actionable and make the test more consistent with others, so I left them in. No QA required.
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.
not intended to merge, this is just #4919 with those 2 jobs running 10x each