-
Notifications
You must be signed in to change notification settings - Fork 798
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: fix flakiness in rerun integration test (#4598)
This addresses some test flakiness in `/test/integration/rerun/rerun.js` which has caused ~4 e2e test failures in CI builds in the last 3 weeks. It manifests as a timeout because the test uses assertions within callbacks to `axe.run` without propogating errors to the `done` callback; this addresses that similarly to other tests using the run callback pattern, which should cause new errors in this test to report the actual assertion failure instead of just timing out. I wasn't able to locally repro the actual failure, but I think a good guess as to why it's failing flakily is the same issue we saw with other tests doing deep comparison of axe result objects (testEnvironment differing between nearby scans due to windowHeight differences). I addressed that by reusing the test util we added for doing result comparison. I didn't want to hardcode knowledge of the testEnvironment thing into yet another individual test case, so I also refactored the test utility to move that knowledge into one location with a comment explaining it. --------- Co-authored-by: dbjorge <dbjorge@users.noreply.github.com>
- Loading branch information
Showing
5 changed files
with
46 additions
and
52 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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