fix: incorrect timeout handling in webServer configuration#2813
Conversation
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughAdded Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/playwright.config.spec.ts`:
- Around line 4-54: Tests currently construct configs with defineConfig and
assert the same literals, so they validate defineConfig instead of the real
exported Playwright configs; replace each test to import the actual exported
config object(s) from the Playwright config module (the module that currently
exports your Playwright configs) and assert their properties (testDir,
testIgnore, timeout, retries, reporter, webServer?.command/port/timeout) rather
than building a new config; keep using the same identifiers from the spec
(defineConfig, isCI, config.reporter, config.webServer) as references, adjust
test names to reflect they validate the exported config, and for CI-dependent
assertions ensure isCI is derived or mocked consistently with the production
config.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1be21d1b-45ec-456b-ad98-da15543b23ff
📒 Files selected for processing (3)
e2e/playwright.config.tse2e/playwright.playground.config.tstests/playwright.config.spec.ts
There was a problem hiding this comment.
Pull request overview
This PR aims to correct Playwright E2E webServer timeout handling by updating the Playwright configuration used to start local servers during E2E runs.
Changes:
- Add an explicit
timeouttowebServerin the main E2E Playwright config. - Add an explicit
timeouttowebServerin the playground E2E Playwright config. - Add a new spec file intended to assert expected Playwright config values.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
tests/playwright.config.spec.ts |
Adds tests intended to validate Playwright config values. |
e2e/playwright.playground.config.ts |
Adds webServer.timeout for the playground server startup. |
e2e/playwright.config.ts |
Adds webServer.timeout for the main E2E server startup. |
| import { defineConfig } from '@playwright/test' | ||
| import { isCI } from 'std-env' |
There was a problem hiding this comment.
This spec file likely won't run in CI: the root Vitest config only executes the packages/*/vitest.config.ts projects, so tests/playwright.config.spec.ts is excluded. Also, the root workspace package doesn't declare @playwright/test as a dependency, so running this test from the root would fail module resolution unless you move it into the e2e/ workspace (or add the dependency and include this path in Vitest).
| test('playwright config has correct testDir', () => { | ||
| const config = defineConfig({ | ||
| testDir: 'tests', | ||
| }) | ||
| expect(config.testDir).toBe('tests') |
There was a problem hiding this comment.
test/expect are used throughout this file but never imported. If this is intended to be a Vitest spec, import them from vitest; if it's intended to be a Playwright test, import them from @playwright/test.
| command: 'pnpm likec4 start --verbose --no-react-hmr --no-build-webcomponent', | ||
| port: 5173, | ||
| stdout: 'pipe', | ||
| timeout: 60 * 1000, | ||
| env: { |
There was a problem hiding this comment.
webServer.timeout defaults to 60_000ms in Playwright Test (v1.56.x). Setting it to 60 * 1000 here does not change behavior, so it likely won't address “timeout handling” issues unless the intention is to increase it (or disable by setting 0).
| command: 'pnpm --filter @likec4/playground dev -- --port 5174', | ||
| port: 5174, | ||
| stdout: 'pipe', | ||
| timeout: 60 * 1000, | ||
| reuseExistingServer: !isCI, |
There was a problem hiding this comment.
webServer.timeout defaults to 60_000ms in Playwright Test (v1.56.x). Making it explicit as 60 * 1000 is a no-op; if this PR is meant to fix server-start timeouts, consider increasing this value (or using 0 to disable the startup timeout).
- update tests/playwright.config.spec.ts - address 1 review comment(s) Signed-off-by: Zendy <50132805+zendy199x@users.noreply.github.com>
bd8e4f8 to
1324d71
Compare
Checklist
mainbefore creating this PR.