feat: playwright e2e tests for vscode extension#161
Merged
florintimbuc merged 32 commits intopablodelucca:mainfrom Mar 24, 2026
Merged
feat: playwright e2e tests for vscode extension#161florintimbuc merged 32 commits intopablodelucca:mainfrom
florintimbuc merged 32 commits intopablodelucca:mainfrom
Conversation
Adds a complete end-to-end test setup using Playwright's Electron API to
validate the Pixel Agents extension inside a real VS Code instance.
- e2e/playwright.config.ts — config with video, trace, 1-worker isolation
- e2e/global-setup.ts — downloads VS Code via @vscode/test-electron
- e2e/helpers/launch.ts — launches VS Code with isolated HOME + mock PATH
- e2e/helpers/webview.ts — waits for the webview frame, clicks + Agent
- e2e/fixtures/mock-claude — deterministic claude shim: creates JSONL file,
logs invocation; no real Claude CLI required
- e2e/tests/agent-spawn.spec.ts — first spec: click + Agent → assert mock called,
JSONL session file created, terminal tab visible
- e2e/tsconfig.json — strict TypeScript config for test code
NPM scripts added: e2e (xvfb-run headless), e2e:headed, e2e:debug
CONTRIBUTING.md updated with running instructions, artifact paths, mock docs
test-results/ and playwright-report/ added to .gitignore
Test passes locally in 25 s; video recording confirmed at
test-results/e2e/videos/<test-name>/*.webm
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This reverts commit 52096c0.
…r-vscode-extension fix: cross-platform fixes for Playwright e2e tests on macOS
fix: playwright e2e windows
…ests-for-vscode-extension
124cc3a to
a3657c8
Compare
a3657c8 to
3f418f0
Compare
371f654 to
a6900a8
Compare
florintimbuc
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a smoke test. It starts the VS Code Extension and pressed on the "+ Agent" button. It is verified that a new terminal pops up.
This is a core behavior so we know if this flow doesn't work something fundamental has broken.
ca2a2272e031af72493ed2eec10e946650157ece.webm
Feel free reverting the commit "feat: revert this commit later, for now we will include video report in artifact". I left it in since I found it useful and no test artifact is being uploaded.
AI Summary below
Summary
claude, creates a JSONL session file, and shows a Claude Code terminal tabWhat's included
e2e/playwright.config.tson, trace on retry, 1 workere2e/global-setup.ts@vscode/test-electron, caches to.vscode-test/e2e/helpers/launch.ts--extensionDevelopmentPath, isolatedHOME+userDataDir, mockclaudeinPATH, records videoe2e/helpers/webview.ts+ Agente2e/fixtures/mock-claude--session-id, writes invocation log, creates.jsonlfilee2e/tests/agent-spawn.spec.tse2e/tsconfig.jsonHow to run
Test result
Video recorded at
test-results/e2e/videos/<test-name>/*.webmFlakiness notes & mitigations
waitForSelector('.monaco-workbench')getPixelAgentsFramepolls all frames every 500 ms for up to 30 s/Claude Code #\d+/is resilient to aria-label changesexpect.pollretries for 20 s at 500 ms / 1 s intervalsxvfb-run --auto-servernumin thee2escript🤖 Generated with Claude Code