Skip to content

feat: full-bundle driver for the headless host#305

Draft
eugypalu wants to merge 9 commits into
eugenio/headless-host-stressfrom
eugenio/headless-host-full-bundle
Draft

feat: full-bundle driver for the headless host#305
eugypalu wants to merge 9 commits into
eugenio/headless-host-stressfrom
eugenio/headless-host-full-bundle

Conversation

@eugypalu

Copy link
Copy Markdown
Contributor

A driver that tests a real product against the headless host: the product's shipped bundle.

The product under test is the playground, deployed as truapi-playground.dot. Its Diagnosis mode exercises the whole TrUAPI method surface, which makes it the widest-coverage product the driver can be pointed at. The driver itself is product-agnostic: any product bundle that speaks TrUAPI through the standard bootstrap can be loaded the same way.

  • js/scripts/load-bundle.ts — serves the static export on loopback, registers happy-dom on the main realm and injects window.__HOST_API_PORT__ before the bundle's scripts run, which is the webview-host production path the product bootstrap already supports. It pumps binary frames to the host's WebSocket frame server, one Uint8Array per SCALE frame, pure forwarding, then clicks the playground's Diagnosis run and reads the result from the product's own DOM.
  • e2e/full-bundle.sh — one-command orchestration: fresh pairing-host state per run; login-first, with a minimal requestLogin script that triggers pairing and a wait for the session and the device-key statement-store allowance; the pairing deeplink answered by the in-repo signing host; and a per-op gate on the metrics JSONL requiring sign_raw, sign_payload and create_transaction to succeed.
  • playground/tests/e2e-headless/targets.ts — every selector the driver uses to drive the playground UI lives in this one file, so a playground UI change means updating a single place.

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​happy-dom@​20.11.0661008892100
Addednpm/​@​happy-dom/​global-registrator@​20.11.01001008795100

View full report

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