From deca26931e34ef81cddbb4704a4aa5306a8023f9 Mon Sep 17 00:00:00 2001 From: Frederic Cabassut Date: Thu, 12 Mar 2026 21:08:14 +0100 Subject: [PATCH] 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 --- playwright.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playwright.config.ts b/playwright.config.ts index f794c9c..d642b01 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -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: [ {