From fa990cb974c6a95f76a7e21a1d3b578c17bd80ca Mon Sep 17 00:00:00 2001 From: vmomenv <51269338+vmomenv@users.noreply.github.com> Date: Thu, 12 Mar 2026 07:01:40 +0000 Subject: [PATCH] test: fix playwright timeout due to localhost resolution Playwright tests were timing out on CI because the Vite dev server was listening on `http://localhost:5173/` but `playwright.config.ts` was configured to wait for `http://127.0.0.1:5173/`. Node 17+ resolves `localhost` to IPv6 (`::1`), causing Playwright's strict IPv4 wait to time out. This commit updates `playwright.config.ts` to use `http://localhost:5173` for both `baseURL` and the `webServer.url`. --- playwright.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playwright.config.ts b/playwright.config.ts index dc2a1d92..3dfbdf76 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -11,7 +11,7 @@ export default defineConfig({ ["json", { outputFile: "test-results.json" }], ], use: { - baseURL: "http://127.0.0.1:5173", + baseURL: "http://localhost:5173", trace: "on-first-retry", screenshot: "only-on-failure", video: "retain-on-failure", @@ -24,7 +24,7 @@ export default defineConfig({ ], webServer: { command: "npm run dev", - url: "http://127.0.0.1:5173", + url: "http://localhost:5173", reuseExistingServer: !process.env.CI, timeout: 120 * 1000, stdout: "pipe",