fix: block service worker in e2e tests to prevent response interception

Active service workers change the fetch lifecycle enough that Playwright's
waitForResponse() misses SW-mediated responses, causing preferences tests
to timeout. Block SW registration during e2e tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Frederic Cabassut
2026-03-12 21:08:20 +01:00
co-authored by Claude Opus 4.6
parent 335b01f60e
commit deca26931e
+2 -1
View File
@@ -11,7 +11,8 @@ export default defineConfig({
use: {
baseURL: 'http://localhost:4173',
trace: 'on-first-retry',
screenshot: 'only-on-failure'
screenshot: 'only-on-failure',
serviceWorkers: 'block'
},
projects: [
{