Playwright error

page.goto: net::ERR_CONNECTION_REFUSED

Playwright tried to navigate to a URL where nothing is listening yet. Usually the dev/test server wasn't ready.

Why this happens

How to fix it

  1. Confirm the server is actually listening on that exact port before tests start
  2. Use the `webServer` option in playwright.config.ts with a `url` health check so Playwright waits for readiness
  3. Increase `webServer.timeout` if the app is slow to boot, especially in CI