Skip to content

Conversation

@hassoncs
Copy link
Contributor

@hassoncs hassoncs commented Jun 25, 2025

This setup enables robust end-to-end testing of the VS Code extension's functionality including simulated user interactions with the webview!

2025-06-25 14 14 40

  • New apps/playwright-e2e directory: Contains all Playwright test configurations, helpers, and test files.
  • Base test setup: playwright-base-test.ts for launching VS Code with the extension and managing temporary directories.
  • Global setup: playwright.globalSetup.ts for downloading VS Code versions. (insiders currently commented out in case we want to add it later)
  • Helper functions: webview-helpers.ts for interacting with the extension's webview.
  • Initial tests: sanity.test.ts to verify VS Code launch and extension installation, and chat-with-response.test.ts for a basic chat interaction test.

Dev notes
I put all of this playwright testing into a new directory instead of the existing vscode-e2e directory because I wanted to get your opinion on it before spending more time on integration. We could fully replace the existing tests with playwright, but let me know what you think! I'm happy to help!

Test plan: Tried it out locally, tests pass!


Important

Setup Playwright E2E testing for VS Code extension with new configurations, helpers, and initial tests.

  • Setup:
    • New apps/playwright-e2e directory for Playwright configurations, helpers, and tests.
    • playwright-base-test.ts for launching VS Code with the extension and managing temp directories.
    • playwright.globalSetup.ts for downloading VS Code versions (insiders commented out).
  • Helpers:
    • webview-helpers.ts for interacting with the extension's webview.
  • Tests:
    • sanity.test.ts verifies VS Code launch and extension installation.
    • chat-with-response.test.ts tests basic chat interaction.
  • Misc:
    • Adds Playwright-related scripts to package.json and turbo.json.
    • Global vscode object in vscode.ts for test message posting.

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

@hassoncs hassoncs requested review from cte, jr and mrubens as code owners June 25, 2025 21:16
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 25, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 25, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Draft / In Progress] in Roo Code Roadmap Jun 26, 2025
@daniel-lxs daniel-lxs marked this pull request as draft June 26, 2025 12:45
@hannesrudolph hannesrudolph added PR - Draft / In Progress and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jun 26, 2025
This setup enables robust end-to-end testing of the VS Code extension's functionality including simulated user interactions with the webview!

- **New `apps/playwright-e2e` directory**: Contains all Playwright test configurations, helpers, and test files.
- **Base test setup**: `playwright-base-test.ts` for launching VS Code with the extension and managing temporary directories.
- **Global setup**: `playwright.globalSetup.ts` for downloading VS Code versions. (insiders currently commented out in case we want to add it later)
- **Helper functions**: `webview-helpers.ts` for interacting with the extension's webview.
- **Initial tests**: `sanity.test.ts` to verify VS Code launch and extension installation, and `chat-with-response.test.ts` for a basic chat interaction test.

**Dev notes**
I put all of this playwright testing into a new directory instead of the existing vscode-e2e directory because I wanted to get your opinion on it before spending more time on integration.
We could fully replace the existing tests with playwright, but let me know what you think! I'm happy to help!

Test plan: Tried it out locally, tests pass!
@hassoncs hassoncs force-pushed the playwright-e2e-testing branch from 33d76c9 to ccd4c6c Compare July 1, 2025 20:15
Update Playwright E2E test configuration to use ESNext modules and bundler resolution.
Add `@roo-code/types` and `vitest` as dev dependencies.
Adjust tsconfig.json to include new types and helper directories.
@hassoncs hassoncs force-pushed the playwright-e2e-testing branch from ccd4c6c to 5590d0b Compare July 1, 2025 20:16
@hassoncs hassoncs force-pushed the playwright-e2e-testing branch from acc5311 to 11af86d Compare July 1, 2025 20:49
This sets up the playwright tests the same way the existing integration tests are setup today to prove they can work well in CI.

Integrates the Playwright E2E test suite into the `code-qa.yml` CI workflow.
This new job, `playwright-e2e-test`, runs only if an `OPENROUTER_API_KEY`
secret is available, ensuring that the tests are executed in environments
where the necessary API key is provided.
@hannesrudolph
Copy link
Collaborator

@cte @daniel-lxs What are your thoughts on this?

@hassoncs
Copy link
Contributor Author

hassoncs commented Jul 7, 2025

Sorry to leave this open for so long! Getting playwright to run properly in Docker turned out to be tricker than I expected! 😅

But as of a moment ago I finally have the dockerized tests passing (I was iterating in our repo so I didn't cause a million docker builds for you!)
https://github.com/Kilo-Org/kilocode/actions/runs/16128097292/job/45509727891?pr=832

But let me know what your thoughts are! I'm going to push to include this in the Kilo repo since I've found Playwright helpful when building new UI features

@wheelo
Copy link

wheelo commented Jul 15, 2025

cool

@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Sep 23, 2025
@github-project-automation github-project-automation bot moved this from PR [Draft / In Progress] to Done in Roo Code Roadmap Sep 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR - Draft / In Progress size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants