diff --git a/packages/app-desktop/integration-tests/wcag.spec.ts b/packages/app-desktop/integration-tests/wcag.spec.ts index 2476d32221..db8bd07f53 100644 --- a/packages/app-desktop/integration-tests/wcag.spec.ts +++ b/packages/app-desktop/integration-tests/wcag.spec.ts @@ -28,10 +28,15 @@ const waitForAnimationsToEnd = (page: Page) => { const expectNoViolations = async (page: Page) => { await waitForAnimationsToEnd(page); - const results = await createScanner(page).analyze(); - expect(results.violations).toEqual([]); -}; + const scanner = createScanner(page); + // Retry the accessibility scanner on failure to prevent + // random failure in CI. + await expect.poll(async () => { + const results = await scanner.analyze(); + return results.violations; + }).toEqual([]); +}; test.describe('wcag', () => { for (const tabName of ['General', 'Plugins']) {