diff --git a/frontend/playwright.config.ts b/frontend/playwright.config.ts index 38b7a1f..1808161 100755 --- a/frontend/playwright.config.ts +++ b/frontend/playwright.config.ts @@ -2,7 +2,28 @@ import { defineConfig, devices } from '@playwright/test'; export default defineConfig({ testDir: './tests/e2e', + // Kept true so a file's tests are independent units, but with one worker it + // no longer interleaves them. See `workers` below. fullyParallel: true, + // One worker, because the suite shares a single database. + // + // This was the lever #241 deliberately held back, to see first whether better + // failure messages and a wider assertion timeout were enough. They were not. + // Measured on this branch, same commit, same machine: parallel runs failed 3 + // of 155 twice over, and the three were not the same three — password-reset + // and admin-inventory-filters in one run, admin-email-settings, + // admin-inventory-filters and resend-verification in the next. Run serially, + // all 16 of those same tests passed; the full suite then passed 155 of 155 + // twice in a row. + // + // So the failures were contention, not defects: specs asserting over tables + // that other specs were concurrently writing to. The cost is about 3 minutes + // — roughly 1 minute parallel against 3.9 and 4.0 serially — and a red run + // that means something is worth three minutes. + // + // The cheaper fix, if that time is ever needed back, is giving each worker + // its own database rather than raising this number and reopening #241. + workers: 1, retries: process.env.CI ? 1 : 0, reporter: [['list']], use: {