test: add smoke:web:app — drive a real MCP App end to end in headless Chromium
`smoke:web:browser` stops at first paint and never connects to a server, so everything downstream of the connect — the Apps tab, the sandbox controller, the UI-protocol bridge — was unexercised by any smoke. That is the code #1859 broke, and nothing would have caught a regression in it. smoke:web:app boots the same prod --web server, spawns the mcp-app-http.json composable server, and drives connect → open app → widget ready through one deep-link navigate. The assertion is the documented data-app-status="ready" contract, which the renderer only reports once the widget has loaded inside the sandbox iframe AND completed its bridge handshake — so a single attribute covers the proxy being served, the UI resource loading, and the handshake. Two mechanics found by running it, both silent-failure shaped: - server-composable.ts announces readiness on stderr, not stdout, so watching stdout alone times out with an empty diagnostic. Both streams are scanned. - the bound port is not the configured one — createTestServerHttp resolves via findAvailablePort(), which walks upward when the port is taken. The smoke parses the announced URL instead of assuming 3130. Scope: this runs against the repo build tree like every other smoke, so it would NOT have caught #1859 itself (a packaging failure; the file is always present in-repo). pack:verify owns that dimension — the two are complements, and the header comment says so. A cheap structural pre-check does assert the proxy page sits where sandbox-controller.ts resolves it, so a move/rename fails fast. Both failure modes verified by hand: with clients/web/static removed, the pre-check fires; with the pre-check bypassed, the data-app-status assertion catches it independently. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAR2Nr9kXbrywFNUVoTe9F
This commit is contained in:
parent
28a21c5e08
commit
cf0ed4ac78
1 changed files with 315 additions and 6 deletions
8
.github/workflows/main.yml
vendored
8
.github/workflows/main.yml
vendored
|
|
@ -93,9 +93,11 @@ jobs:
|
|||
# CLI/web). Not part of any client's `validate`: it needs the
|
||||
# cli/tui/launcher bundles, which `validate` above already built
|
||||
# (smoke:web builds clients/web/dist on demand — #1486). smoke:web:browser
|
||||
# boots the prod web bundle in headless chromium (#1615). smoke:tui
|
||||
# self-skips here — the Ink TUI needs a real TTY (raw mode) that headless
|
||||
# CI lacks, so its boot/render check is local-only.
|
||||
# boots the prod web bundle in headless chromium (#1615); smoke:web:app
|
||||
# goes further and drives connect → open app → widget ready against a
|
||||
# composable MCP App server (#1859). Both reuse the chromium installed
|
||||
# above. smoke:tui self-skips here — the Ink TUI needs a real TTY (raw
|
||||
# mode) that headless CI lacks, so its boot/render check is local-only.
|
||||
run: npm run smoke
|
||||
|
||||
- name: Run Storybook play-function tests
|
||||
|
|
|
|||
Loading…
Reference in a new issue