Skip to content

test(e2e): Playwright regression suite for Studio and Hub, run in CI - #107

Merged
tomasz-zajac-oss merged 4 commits into
mainfrom
test/e2e-playwright
Sep 29, 2026
Merged

tomasz-zajac-oss merged 4 commits into
mainfrom
test/e2e-playwright

Conversation

@tomasz-zajac-oss

Copy link
Copy Markdown
Collaborator

Summary

Adds an end-to-end regression suite (apps/e2e, Playwright) that drives the production web builds of Studio and Hub, and runs it in the pipeline.

  • Coverage (45 tests): welcome screen and sample; editing (palette drop, rename, Alt-drag connect, forbidden relation, undo/redo, delete, reload); static, nested, dynamic, table, treemap, matrix and wiki views; Viewer/Presenter perspectives; presentation playback and slide deep links; PNG/SVG export; Smart Layout invariants (no overlapping siblings, children inside parents, same result on every run); Hub landing, categories, search, concept canvas/wiki/table and .radical download.
  • Visual regression: toHaveScreenshot on a frozen page clock, so animations and the live layout render the same frame every run. Baselines are Linux-only, generated in the mcr.microsoft.com/playwright:v1.63.0-noble image. Screenshot assertions are skipped on macOS/Windows; everything else runs there.
  • Guards: every test fails on uncaught exceptions or console.error; requests leaving localhost are blocked. Hub's requests to hub.radical.tools are served from this build's out/hub/, so the suite checks the catalogue that is about to ship, not production.
  • Pipeline: reusable e2e.yml called from ci.yml; deploy.yml now deploys only after e2e passes. Adding the update-screenshots label to a PR regenerates the baselines in CI and commits them to the branch (only if the suite then passes).
  • npm run e2e from the root builds both apps and runs the suite (~1 min locally). Details in apps/e2e/README.md.

Bugs found while writing the suite

Each is a test.fail test in apps/e2e/tests/studio/known-issues.spec.ts (green while the bug exists, red once it's fixed) and is logged in docs/IMPROVEMENTS.md:

  1. The live WebCoLa layout never settles in views with nested elements: nodes drift 80–320 px in 10 s (also in the Fintech sample and on Hub concept canvases).
  2. Because of that, the 400 ms autosave debounce never fires; edits are saved only on pagehide, together with the drifted positions.
  3. Double-click on the empty canvas does not add a system (React Flow's zoomOnDoubleClick swallows it).
  4. The Quick Search bar covers Undo/Redo at 1440 px.
  5. Hub's local catalogue fallback rejects .radical files served without a JSON content type, so concept deep links fail when hub.radical.tools is unreachable.
  6. Property-panel <label>s are not tied to their inputs.

Before merging

The screenshot baselines are not in this PR yet, so the E2E check fails until they are. Add the update-screenshots label, review the committed images, then re-run CI (a bot push does not trigger workflows). Since deploy now depends on e2e, merging without baselines would block deploys.

Type of change

  • Tests
  • Other: CI pipeline (e2e job, deploy gate, baseline update workflow)

Checklist

  • npm test passes
  • npm run typecheck passes with no errors
  • New or changed behaviour is covered by tests
  • Documentation updated if needed (README, CONTRIBUTING, apps/e2e/README.md, docs/IMPROVEMENTS.md)

🤖 Generated with Claude Code

Tomasz Zajac and others added 3 commits September 29, 2026 12:40
New workspace apps/e2e drives the production web builds (vite preview of
out/) through their real UI: boot and sample, editing, every view kind,
perspectives, presentations, export, Smart Layout invariants and Hub.

Screenshot baselines are Linux-only (Playwright image) and taken on a
frozen page clock so animations and the live layout render the same frame
on every run. Each test fails on uncaught exceptions or console errors and
blocks requests that leave localhost; Hub's catalogue requests are served
from the build's own out/hub/.

known-issues.spec.ts records bugs found while writing the suite as
test.fail, so they turn red once fixed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e2e.yml (reusable) runs the suite in the Playwright image and uploads the
report. ci.yml calls it, and deploy.yml now deploys only after it passes.
The update-screenshots label on a PR regenerates the baselines and commits
them to the branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tomasz-zajac-oss tomasz-zajac-oss added the update-screenshots Regenerate e2e screenshot baselines and commit them to the PR branch label Sep 29, 2026
@github-actions github-actions Bot removed the update-screenshots Regenerate e2e screenshot baselines and commit them to the PR branch label Sep 29, 2026
@tomasz-zajac-oss
tomasz-zajac-oss merged commit 87c49bb into main Sep 29, 2026
7 checks passed
@tomasz-zajac-oss
tomasz-zajac-oss deleted the test/e2e-playwright branch September 29, 2026 10:58
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.

1 participant