Skip to content

fix: Resolve E2E test timeout (post-merge hotfix)#54

Merged
dcversus merged 1 commit into
mainfrom
hotfix/e2e-port-timeout
Oct 29, 2025
Merged

fix: Resolve E2E test timeout (post-merge hotfix)#54
dcversus merged 1 commit into
mainfrom
hotfix/e2e-port-timeout

Conversation

@dcversus

@dcversus dcversus commented Oct 28, 2025

Copy link
Copy Markdown
Member

🐛 Problem

After PR #52 merge, E2E tests timeout in CI (120 seconds waiting for dev server).

🔍 Root Cause

Port mismatch:

  • Playwright expects: http://localhost:3000
  • Vite uses: http://localhost:3003 (auto-incremented when 3000 occupied)
  • Result: 120-second timeout

✅ Solution

# playwright.config.ts
+      PORT: '3000', // Force port 3000 for E2E tests

# vite.config.ts  
+      strictPort: isCI, // Fail if port unavailable on CI

🧪 Test Results

  • ✅ E2E tests: 2 passed, 1 skipped (29.1s)
  • ✅ Unit tests: 107 passed, 17 skipped
  • ✅ TypeScript: 0 errors
  • ✅ ESLint: 0 errors, 0 warnings

📊 Changes

Only 2 lines changed (1 per file)

Summary by CodeRabbit

  • Chores
    • Configured end-to-end tests to run on a consistent port.
    • Updated development server configuration to enforce strict port availability in CI environments, ensuring builds fail if the port is unavailable.

- Added PORT=3000 env var to Playwright webServer config
- Added strictPort: isCI to Vite config (fail if port unavailable on CI)
- Fixes 120-second timeout caused by Vite auto-incrementing to port 3003
- All E2E tests now pass (2 passed, 1 skipped, 29.1s)

Issue: Playwright expected http://localhost:3000 but Vite used 3003 when 3000 was occupied
Solution: Force consistent port usage for E2E test environment
@coderabbitai

coderabbitai Bot commented Oct 28, 2025

Copy link
Copy Markdown

Walkthrough

The changes modify development and testing configuration. Playwright config now explicitly sets PORT environment variable to 3000 for E2E tests to ensure consistency with test URLs. Vite config adds strict port mode for CI environments, causing the development server to fail if the specified port is unavailable instead of attempting alternate ports.

Changes

Cohort / File(s) Summary
Port Configuration
playwright.config.ts, vite.config.ts
playwright.config.ts: Adds PORT=3000 to webServer.env for consistent E2E test execution. vite.config.ts: Introduces strictPort: isCI to enforce port availability in CI environments, failing on port conflicts rather than auto-selecting alternatives.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Straightforward configuration additions with no logic changes
  • Localized to two config files with minimal scope
  • Changes are self-contained and directly verifiable against their documented purposes

Poem

🐰 Port three-thousand, anchored tight,
No wandering servers in the night,
CI now stands with strictest hand,
Where ports must be, as firmly planned,
Config blessed, all tests aligned! 🚀

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description does not follow the required template structure specified in the repository. While the description provides useful information about the problem, root cause, solution, and test results, it is missing critical sections including the 🎯 PR Summary with Related PRP and Type of Change marking, 🚨 Signals System Check, ✅ Definition of Done, most of the 🧪 Testing & Quality checklist items (code quality, performance), 🛡️ Legal Compliance, 📚 Documentation, 🔍 Code Review Checklist, 📊 CI/CD Status, and ✍️ Pre-Submission Checklist. The description appears to use a custom format rather than attempting to complete the required template.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "fix: Resolve E2E test timeout (post-merge hotfix)" is directly and accurately related to the main changes in the pull request. It clearly identifies the issue being fixed (E2E test timeout) and uses the "fix:" prefix to indicate this is a bug fix. The title succinctly describes why the changes were made (to resolve timeouts that occurred after PR #52 merged), making it clear to teammates reviewing the repository history what the primary change addresses.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch hotfix/e2e-port-timeout

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6841c2d and 05ccd44.

📒 Files selected for processing (2)
  • playwright.config.ts (1 hunks)
  • vite.config.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build Check
🔇 Additional comments (2)
playwright.config.ts (1)

77-77: LGTM! Port enforcement prevents auto-increment.

Setting PORT: '3000' in the webServer environment correctly forces Vite to use port 3000, ensuring consistency with the baseURL (line 46) and url (line 70) settings. This directly addresses the root cause where Vite auto-incremented to 3003 when 3000 was occupied, causing Playwright to timeout while targeting the wrong port.

vite.config.ts (1)

84-84: LGTM! Strict port mode ensures deterministic CI behavior.

Setting strictPort: isCI ensures Vite fails fast on CI if port 3000 is unavailable, rather than silently auto-incrementing to another port. This works correctly with Playwright's PORT: '3000' setting to guarantee deterministic port usage during E2E tests. Keeping strictPort: false locally (when not in CI) maintains good developer experience by allowing auto-increment if port 3000 is occupied.


Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

📊 Test Reports & Coverage

Test Results

Unit Tests: failure
⏭️ E2E Tests: skipped

🔗 View Full Workflow Run


📥 Download Artifacts

Unit Test Coverage

📈 Unit Test Coverage Report - unit-test-coverage

  • HTML report with line-by-line coverage
  • Open lcov-report/index.html after extracting

E2E Test Results

🎭 Playwright HTML Report - playwright-report
📸 E2E Screenshots - e2e-screenshots
🔍 E2E Test Results - e2e-test-results (videos, traces)

Build Artifacts

📦 Build Artifacts - dist


📖 How to view reports
  1. Click on artifact links above
  2. Scroll down to "Artifacts" section at bottom of page
  3. Download the zip file
  4. Extract the zip file
  5. Open HTML files in your browser:
    • Coverage: coverage/lcov-report/index.html
    • Playwright: index.html

🤖 Auto-generated by CI/CD Pipeline • Updated on every push

@dcversus

Copy link
Copy Markdown
Member Author

ℹ️ Unit Test Coverage Note

The unit test failure (Coverage 6.11%) is a pre-existing issue from main branch (introduced in Phase 2 rendering implementation).

This was approved and merged in PR #52 despite the coverage issue, as it's unrelated to the Signals System or this E2E port fix.

This hotfix:

  • ✅ Fixes E2E test timeout (verified locally: 2 passed, 1 skipped, 29.1s)
  • ✅ Changes only 2 lines (port configuration)
  • ✅ All other CI checks passing (lint, typecheck, security, signals)

Recommendation: Merge this hotfix to unblock E2E tests in CI, then address coverage in a separate PR.

@dcversus dcversus merged commit d1f18a6 into main Oct 29, 2025
10 of 12 checks passed
@dcversus dcversus deleted the hotfix/e2e-port-timeout branch October 29, 2025 10:14
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