From 9953ccdf66132cb2bfee8d46b9b805b54d97c5bb Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sat, 24 Oct 2026 22:24:46 +0100 Subject: [PATCH] Retry failed Firefox and WebKit tests once Firefox and WebKit tests are flakier than Chromium tests. Chromium doesn't retry, so flakes caused by the grid itself still fail there. On GitHub Actions, the job summary lists tests that passed on retry. Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 1 + vite.config.ts | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 6c710d1639..40d3c857f2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -45,6 +45,7 @@ website/ # demo site (Vite + TanStack Router) - Browser tests use `vite-plus/test/browser` + Playwright. `test/setupBrowser.ts` configures `page.render()` via `vitest-browser-react` and registers custom locators via `locators.extend()` — prefer `page.getGrid()`, `page.getCell({ name })`, `page.getRow()`, `page.getHeaderCell()`, `page.getActiveCell()`, etc. over raw `page.getByRole()`. - Test helpers in `test/browser/utils.tsx`: `setup()`, `getRowWithCell()`, `getCellsAtRowIndex()`, `validateCellPosition()`, `scrollGrid()`, `safeTab()`, `testCount()`, `testRowCount()`. - `test/failOnConsole.ts` fails tests on unexpected console warnings/errors. +- Firefox and WebKit retry failed tests once (`retry` in `vite.config.ts`), and `--retry=0` doesn't override it. Add `--reporter=verbose` to see tests that passed on retry, marked `(retry x1)`. - **Never run visual regression tests** — screenshots are environment-dependent, so visual regression tests must run in CI only. ## Tooling diff --git a/vite.config.ts b/vite.config.ts index 4fe6cec15b..9a488c251f 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -60,6 +60,10 @@ async function getTscPath(): Promise { const actionTimeout = 2000; const viewport = { width: 1920, height: 1080 } as const; +// Firefox and WebKit tests are flakier than Chromium tests, so they retry failed tests once. +// Chromium doesn't retry, so flakes caused by the grid itself still fail there. +// On GitHub Actions, the job summary lists tests that passed on retry. +const retry = 1; const playwrightOptions: PlaywrightProviderOptions = { actionTimeout, contextOptions: { @@ -299,11 +303,13 @@ export default defineConfig({ } }), // TODO: remove when FF tests are stable - fileParallelism: false + fileParallelism: false, + retry }, { browser: 'webkit', - provider: playwright(playwrightOptions) + provider: playwright(playwrightOptions), + retry } ] },