Skip to content

test(ui): one Playwright layout with app, mcp and visual surfaces - #358

Merged
vishr merged 3 commits into
mainfrom
test/e2e-layout
Oct 19, 2026
Merged

vishr merged 3 commits into
mainfrom
test/e2e-layout

Conversation

@vishr

@vishr vishr commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

Moves the browser suite into one layout and adds two surfaces: the MCP App view inside a standard host, and screenshot assertions.

ui/host/e2e/
  README.md  fixtures/  data/  host/  support/
  specs/app/  specs/mcp/  specs/visual/  __screenshots__/
  • app: the existing specs, unchanged in behavior. Projects are now app-{1100,1440}-{light,dark}. The seeded Fanout server starts from a setup project, so mcp and visual runs do not boot it. Setup owns every instance it starts, and teardown removes them all.
  • mcp (new): the built panels.html MCP App, the view ChatGPT, claude.ai and other hosts load as ui://fanout/panels.html, runs inside a mock host on the official @modelcontextprotocol/ext-apps AppBridge. The tool results it receives were recorded from the synthetic e2e seed, never from a real deployment. Coverage: overview, topology, performance, trace, logs, a custom panel, no-data, error, cancelled, loading and the no-host fallback, in both themes, with axe (serious/critical) and keyboard checks. The host fails on unexpected view requests.
  • visual (new): screenshot assertions for the overview, performance and trace views. Linux baselines were generated in the pinned mcr.microsoft.com/playwright:v1.64.1-noble@sha256:7852dc5a… image that the new CI visual job runs in; the job fails if that image's driver differs from the installed @playwright/test. Darwin baselines are for local runs.
  • Specs import test/expect only from e2e/fixtures/test, enforced by the UI boundary check, with a test.
  • Recipes: e2e-mcp, e2e-visual, e2e-ui, e2e-update-snapshots, e2e-linux-baselines and e2e-browsers (the locked Chromium with OS libraries; CI smoke runs it).
  • Dependencies: @playwright/test 1.64.1 and @axe-core/playwright 4.14.0.
  • View change: a main landmark and a status role on its loader.
  • Docs: docs/testing.md documents setup, the backend lifecycle, the mock host, recording and every recipe.

Verification:

  • just e2e: 107 passed, 150 skipped. All 78 previous tests still pass with the same skips.
  • mcp (22) and visual (6) pass locally and inside the pinned CI image; the image driver check passes.
  • just check passes.
  • Two Codex adversarial review rounds. Round one found that CI did not install the bundled Chromium and that repeated setup leaked backends; both are fixed. Round two approved.

ui/host/e2e/data/mcp.json contains view.key values, which are SHA-256 content hashes of recorded preset views, not credentials. Generic secret scanners flag them.

vishr added 3 commits October 19, 2026 10:46
The browser suite moves into e2e/{fixtures,data,host,support,specs/{app,
mcp,visual},__screenshots__} with one project per surface. Specs import
test and expect only from fixtures/test, enforced by the UI boundary check.

- app: the existing specs, unchanged in behavior. The seeded Fanout server
  now starts from a setup project, so mcp and visual runs do not boot it.
- mcp: the built panels MCP App runs in a mock host on the official
  ext-apps AppBridge, fed tool results recorded from the synthetic e2e
  seed: overview, topology, performance, trace, logs, a custom panel,
  no-data, error, cancelled, loading and no-host fallback, in both
  themes, with axe and keyboard checks.
- visual: screenshot assertions for the overview, performance and trace
  views. Linux baselines come from the pinned Playwright image the new CI
  job runs in, and that job fails if the image driver differs from the
  installed @playwright/test.

The view gains a main landmark and a status role on its loader. The
host server binds an OS-assigned port. Recipes: e2e-mcp, e2e-visual,
e2e-ui, e2e-update-snapshots and e2e-linux-baselines.

Claude-Session: https://claude.ai/code/session_018HfyEXHyGD1utmKF4CQtyQ
The smoke job now runs the mcp project, which needs Playwright's bundled
Chromium; just e2e-browsers installs the locked build with its OS
libraries for CI and local setup. Setup stops instances it started
before replacing them, matches readiness to the spawned process, and
teardown removes every instance and its temporary directories.

Claude-Session: https://claude.ai/code/session_018HfyEXHyGD1utmKF4CQtyQ
@vishr
vishr merged commit bfaf5b6 into main Oct 19, 2026
17 checks passed
@vishr
vishr deleted the test/e2e-layout branch October 19, 2026 19:23
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