Branch: refs/heads/backport/stable-17.10.x/misc-wcag-axe-retry-guard Home: https://github.com/xwiki/xwiki-platform Commit: 104162d1fac585526be5342fd39f3f9a00b9c939 https://github.com/xwiki/xwiki-platform/commit/104162d1fac585526be5342fd39f3... Author: Vincent Massol <[email protected]> Date: 2026-09-08 (Tue, 08 Sep 2026) Changed paths: M xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/po/BasePage.java Log Message: ----------- [Misc] Fix flickering WCAG validation due to axe-core injection race When WCAG validation is enabled, BasePage's constructor runs axe-core via AxeBuilder.analyze(), which injects the axe script and then immediately probes window.axe. On a page that changes underneath the analysis (e.g. the refactoring job status page refreshing while the job runs), the page can navigate between the injection and the probe, leaving window.axe undefined and making analyze() fail with a "Cannot read properties of undefined (reading 'runPartial')" JavascriptException. Retry the analysis a few times, waiting for the page to settle between attempts. Only that specific injection-race error is retried; any other JavascriptException rethrows immediately, and the original error is rethrown if all attempts fail, so genuine accessibility violations and failures are preserved. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> (cherry picked from commit 570d0d983a81588c622d9dcce1f5ca6293da5ff2) Commit: 8c9dd05e3ecc21827dbe8796b5af2f20299ce84f https://github.com/xwiki/xwiki-platform/commit/8c9dd05e3ecc21827dbe8796b5af2... Author: Vincent Massol <[email protected]> Date: 2026-09-08 (Tue, 08 Sep 2026) Changed paths: M xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/po/BasePage.java A xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/test/java/org/xwiki/test/ui/po/BasePageTest.java Log Message: ----------- [Misc] Widen the retry guard for the axe-core injection race The retry added for the axe-core injection race only retried errors whose message contains "window.axe", which never matches the error the race actually produces: Chrome reports it as "Cannot read properties of undefined (reading 'runPartial')". The retry therefore rethrew immediately and the flicker remained. * Match the message fragments the race really produces, in Chrome and in Firefox, instead of only "window.axe". * Extract the decision into isAxeNotReadyError() and unit test it, so the guard is checked against the real browser messages rather than only in CI. The JaCoCo instruction ratio bump that accompanies this on master is left out: this branch has no XWikiWebDriverTest, so it reaches 0.0522 and the 0.05 floor already in the pom is the right one here. (cherry picked from commit e682aaae80d59dcae1fa2dc8bfd6ba48a4c96baf) Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Compare: https://github.com/xwiki/xwiki-platform/compare/104162d1fac5%5E...8c9dd05e3e... To unsubscribe from these emails, change your notification settings at https://github.com/xwiki/xwiki-platform/settings/notifications