Skip to content

Comments

feat(e2e): add Playwright smoke tests for Heroku review apps#275

Open
IanMayo wants to merge 6 commits intomainfrom
claude/playwright-heroku-e2e-tests-uJh77
Open

feat(e2e): add Playwright smoke tests for Heroku review apps#275
IanMayo wants to merge 6 commits intomainfrom
claude/playwright-heroku-e2e-tests-uJh77

Conversation

@IanMayo
Copy link
Member

@IanMayo IanMayo commented Feb 21, 2026

Adds test infrastructure to run E2E tests against deployed Heroku
review apps, verifying code-server loads with the Debrief extension:

  • test-heroku-smoke.spec.ts: 5 smoke tests (HTTP check, workbench,
    activity bar, sample files, evidence screenshot) with generous
    timeouts for Heroku cold-starts
  • heroku-e2e.sh: convenience script with cold-start wait loop
  • heroku-e2e.yml: GitHub Actions workflow (manual trigger with URL)

https://claude.ai/code/session_015qorofjGTWZ9LuimGaYGTE

Adds test infrastructure to run E2E tests against deployed Heroku
review apps, verifying code-server loads with the Debrief extension:

- test-heroku-smoke.spec.ts: 5 smoke tests (HTTP check, workbench,
  activity bar, sample files, evidence screenshot) with generous
  timeouts for Heroku cold-starts
- heroku-e2e.sh: convenience script with cold-start wait loop
- heroku-e2e.yml: GitHub Actions workflow (manual trigger with URL)

https://claude.ai/code/session_015qorofjGTWZ9LuimGaYGTE
… run

- .dockerignore: whitelist apps/vscode/*.vsix so the code-server
  Dockerfile can COPY the pre-built extension
- e2e.yml: skip test-heroku-* specs (they require a remote Heroku URL)

https://claude.ai/code/session_015qorofjGTWZ9LuimGaYGTE
--ignore-pattern is not a valid Playwright flag; use --grep-invert
to filter out tests with "Heroku" in their describe block name.

https://claude.ai/code/session_015qorofjGTWZ9LuimGaYGTE
The codercom/code-server base image may set HOME to a non-root
directory, causing uv installed to ~/.local/bin to be unfindable.
Use UV_INSTALL_DIR to place it in /usr/local/bin instead.

https://claude.ai/code/session_015qorofjGTWZ9LuimGaYGTE
…lectors

Three fixes for E2E CI failures:

1. docker/code-server/Dockerfile: install the Debrief VSIX as the
   `coder` user, not root. code-server stores extensions under
   ~/.local/share/code-server/extensions — installing as root puts
   them in /root/... which the coder user cannot see.

2. Dockerfile.preview: apply the same UV_INSTALL_DIR fix so uv
   is reliably on PATH regardless of $HOME.

3. Smoke tests: add broader CSS selectors for the Debrief activity-bar
   icon. VS Code ≥1.93 moved activity-bar items into the sidebar
   header, changing the DOM hierarchy. The new selectors cover
   .action-item and [role="tab"] patterns in addition to the
   original .activitybar and .composite.bar selectors.

https://claude.ai/code/session_015qorofjGTWZ9LuimGaYGTE
Root cause: the Docker code-server image had no user settings, so VS
Code showed the workspace trust dialog on startup. The test tried to
dismiss it within 5s, but in CI cold-start the dialog renders later.
Without dismissal, extensions cannot activate and the Debrief activity
bar icon never appears.

Fix: pre-seed code-server User settings in the Dockerfile with
workspace trust disabled and welcome tab suppressed — matching what
global-setup.ts writes for locally-started code-server.

Also adds diagnostic output to S02 on failure: captures a screenshot
and dumps all role="tab" elements with their IDs and aria-labels.
If the selectors still miss, the CI artifact will show exactly what
the DOM contains.

https://claude.ai/code/session_015qorofjGTWZ9LuimGaYGTE
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