-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Setup Playwright E2E Testing #5124
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
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!
33d76c9 to
ccd4c6c
Compare
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.
ccd4c6c to
5590d0b
Compare
acc5311 to
11af86d
Compare
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.
|
@cte @daniel-lxs What are your thoughts on this? |
|
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!) 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 |
|
cool |
This setup enables robust end-to-end testing of the VS Code extension's functionality including simulated user interactions with the webview!
apps/playwright-e2edirectory: Contains all Playwright test configurations, helpers, and test files.playwright-base-test.tsfor launching VS Code with the extension and managing temporary directories.playwright.globalSetup.tsfor downloading VS Code versions. (insiders currently commented out in case we want to add it later)webview-helpers.tsfor interacting with the extension's webview.sanity.test.tsto verify VS Code launch and extension installation, andchat-with-response.test.tsfor 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.
apps/playwright-e2edirectory for Playwright configurations, helpers, and tests.playwright-base-test.tsfor launching VS Code with the extension and managing temp directories.playwright.globalSetup.tsfor downloading VS Code versions (insiders commented out).webview-helpers.tsfor interacting with the extension's webview.sanity.test.tsverifies VS Code launch and extension installation.chat-with-response.test.tstests basic chat interaction.package.jsonandturbo.json.vscodeobject invscode.tsfor test message posting.This description was created by
for 33d76c9c06f3aa189935a3684ceee34068ef5a17. You can customize this summary. It will automatically update as commits are pushed.