Skip to content

Resolve E2E test timeout - #43

Merged
amrabed merged 1 commit into
mainfrom
fix/e2e-test-webserver
Sep 4, 2026
Merged

amrabed merged 1 commit into
mainfrom
fix/e2e-test-webserver

Conversation

@amrabed

@amrabed amrabed commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes the Playwright E2E test timeout failure (Error: Timed out waiting 60000ms from config.webServer) that occurred in CI after merging PR #42 into main.

Root Causes & Changes

  1. Dynamic serve download in test run: Playwright executed npx serve@latest out -p 3000, causing npm to query the registry and download serve@14.2.6 dynamically during the test step, which was prone to registry network latency or timeouts in CI. Added serve as an explicit devDependency in package.json and updated the start script and webServer command to use the local serve binary.
  2. localhost IPv6 resolution timeout: serve listens on IPv4 by default (0.0.0.0), whereas Node 18+ resolves localhost to IPv6 ::1 first on modern Linux environments, leading to connection retries and timeouts when polling http://localhost:3000. Updated Playwright's baseURL, webServer command (-l tcp://127.0.0.1:3000), and url to use http://127.0.0.1:3000.
  3. Observability: Added stdout: "pipe" and stderr: "pipe" to webServer in playwright.config.ts so server logs are piped into test output.
  4. CI dependency installation: Added an explicit mise run install step in .github/workflows/check.yml prior to the verification checks.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Testing Steps

  • Verified mise run typecheck passes
  • Verified mise run lint passes
  • Verified mise run test:coverage passes (8 tests passing, coverage >= 88%)
  • Verified mise run build succeeds
  • Verified mise run test:e2e completes in ~2.5s with clean webServer startup logs

Checklist

  • pnpm typecheck passes
  • pnpm lint passes
  • pnpm test (Vitest) passes
  • pnpm test:e2e (Playwright) passes
  • Coverage thresholds (80%) met
  • Documentation updated
  • No any types introduced

- Add serve as an explicit devDependency to avoid dynamic npx downloads during test runs
- Explicitly bind and connect to 127.0.0.1:3000 to prevent IPv6 localhost resolution timeouts
- Pipe stdout and stderr from webServer for test observability
- Add explicit dependency installation step in CI check workflow
@vercel

vercel Bot commented Sep 4, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cur8d-github-io Ready Ready Preview Sep 4, 2026 11:23am UTC

@amrabed amrabed changed the title fix: resolve Playwright E2E webServer timeout Resolve E2E test timeout Sep 4, 2026
@amrabed
amrabed merged commit f5fedfd into main Sep 4, 2026
3 checks passed
@amrabed
amrabed deleted the fix/e2e-test-webserver branch September 4, 2026 11:31

This branch was successfully deployed

1 active deployment
Preview — 188577c5 Deployed Sep 4, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant