Skip to content

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Aug 5, 2025

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

  • 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
image

Test Procedure

Green CI

Type of Change

  • 🐛 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)
  • ♻️ Refactor Changes
  • 💅 Cosmetic Changes
  • 📚 Documentation update
  • 🏃 Workflow Changes

Pre-flight Checklist

  • Changes are limited to a single feature, bugfix or chore (split larger changes into separate PRs)
  • Tests are passing (npm test) and code is formatted and linted (npm run format && npm run lint)
  • I have created a changeset using npm run changeset (required for user-facing changes)
  • I have reviewed contributor guidelines

Screenshots

Additional Notes


Important

Update Playwright config to fix teardown order and enhance error handling in global.teardown.ts.

  • Behavior:
    • Remove teardown dependency on e2e tests in playwright.config.ts to fix execution order.
    • Move server cleanup before file operations in global.teardown.ts.
    • Add error handling and logging for server stop and cleanup operations in global.teardown.ts.

This description was created by Ellipsis for 0584234. You can customize this summary. It will automatically update as commits are pushed.

- 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
@Copilot Copilot AI review requested due to automatic review settings August 5, 2025 20:52
Copy link

changeset-bot bot commented Aug 5, 2025

⚠️ No Changeset found

Latest commit: 0584234

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

@Copilot Copilot AI left a 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)

@abeatrix abeatrix requested a review from arafatkatze August 5, 2025 20:54
Copy link
Contributor

@arafatkatze arafatkatze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rubber stamping

Copy link
Contributor

github-actions bot commented Aug 5, 2025

Coverage Report

Extension Coverage

Base branch: 47%

PR branch: 48%

✅ Coverage increased or remained the same

Webview Coverage

Base 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

@abeatrix abeatrix merged commit f2101e3 into main Aug 5, 2025
13 checks passed
dtrugman pushed a commit to dtrugman/cline that referenced this pull request Aug 24, 2025
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.

2 participants