-
Notifications
You must be signed in to change notification settings - Fork 7k
fix: update Playwright config and teardown error handling #5383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Remove teardown dependency on e2e tests to fix execution order - Move server cleanup before file operations in teardown - Add proper error handling and logging for cleanup operations
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes issues with end-to-end test teardown processes that were causing test failures due to improper error handling and execution dependencies. The changes ensure that cleanup operations don't interfere with actual test results and execute in the proper order.
- Remove execution dependency between teardown and e2e tests
- Improve server cleanup ordering and error handling
- Replace throwing errors with logging during cleanup operations
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
File | Description |
---|---|
playwright.config.ts | Removes teardown dependency on e2e tests to fix execution order |
src/test/e2e/utils/global.teardown.ts | Moves server cleanup before file operations and improves error handling |
Comments suppressed due to low confidence (2)
src/test/e2e/utils/global.teardown.ts:10
- The error message should be more specific about what failed. Consider including context like 'Failed to stop ClineApiServerMock during teardown:' to help with debugging.
.catch((error) => console.error("Error stopping ClineApiServerMock:", error))
src/test/e2e/utils/global.teardown.ts:31
- The error message is too generic. It should specify what cleanup operation failed (e.g., 'Error during file cleanup:' or 'Error cleaning up test assets:') to aid in troubleshooting.
console.error("Error during cleanup:", error)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubber stamping
Coverage ReportExtension CoverageBase branch: 47% PR branch: 48% ✅ Coverage increased or remained the same Webview CoverageBase branch: 17% PR branch: 17% ✅ Coverage increased or remained the same Overall Assessment✅ Test coverage has been maintained or improved Last updated: 2025-08-05T21:01:23.104015 |
Related Issue
Issue: #XXXX
Description
Currently the e2e tests could fail when the teardown process takes longer to proceed. You can see it in the logs
1 error was not a part of any test, see above for details
which should not cause any issue for the real tests.Updated so that the error from the teardown process should not be counted toward failing test
Test Procedure
Green CI
Type of Change
Pre-flight Checklist
npm test
) and code is formatted and linted (npm run format && npm run lint
)npm run changeset
(required for user-facing changes)Screenshots
Additional Notes
Important
Update Playwright config to fix teardown order and enhance error handling in
global.teardown.ts
.playwright.config.ts
to fix execution order.global.teardown.ts
.global.teardown.ts
.This description was created by
for 0584234. You can customize this summary. It will automatically update as commits are pushed.