Skip to content

[00260] Add widget E2E verification step to RustyFramework#13

Merged
rorychatt merged 1 commit intomainfrom
tendril/00260-AddWidgetE2eVerificationToRustyFramework
Apr 16, 2026
Merged

[00260] Add widget E2E verification step to RustyFramework#13
rorychatt merged 1 commit intomainfrom
tendril/00260-AddWidgetE2eVerificationToRustyFramework

Conversation

@rorychatt
Copy link
Copy Markdown
Contributor

Changes

Added a complete widget E2E verification infrastructure to RustyFramework. This includes a Rust widget_harness binary that starts per-widget test servers, a vanilla JS WebSocket frontend that renders the widget tree, and Playwright E2E test specs covering 8 widget types. Also added the RustyWidgetE2e verification step to the Tendril config.

API Changes

  • RustyServer::with_static_dir(dir) — new builder method to serve static files from a directory via tower-http
  • RustyServer::serve_background() — new method that starts the server on a background task and returns the bound SocketAddr
  • RustyServer::serve() now prints RUSTY_PORT=<port> to stdout (useful for port-0 auto-assignment)
  • widget_harness binary — new CLI tool: widget_harness <widget> [--port N] [--static-dir PATH]
  • RustyWidgetE2e — new Tendril verification definition in config.yaml

Files Modified

Rust server changes:

  • rusty/src/server/ws.rs — Added with_static_dir(), serve_background(), port-0 printing
  • rusty/Cargo.toml — Added tower-http dependency
  • Cargo.toml — Added tower-http and clap workspace dependencies

New binary:

  • rusty-server/src/bin/widget_harness.rs — Per-widget test app generator (button, text, text_input, number_input, select, checkbox, layout, card)
  • rusty-server/Cargo.toml — Added clap, serde_json deps and [[bin]] entries

E2E test infrastructure:

  • e2e/app/index.html — Vanilla JS WebSocket client rendering all widget types
  • e2e/playwright.config.ts — Chromium-only headless config with JSON+HTML reporters
  • e2e/package.json — Node deps (@playwright/test)
  • e2e/tests/harness.ts — Shared test helper for starting/stopping harness processes
  • e2e/tests/widgets/button.spec.ts — 5 button tests (render, labels, variants, disabled, click)
  • e2e/tests/widgets/text.spec.ts — 4 text block tests
  • e2e/tests/widgets/input.spec.ts — 10 tests across TextInput, NumberInput, Select, Checkbox
  • e2e/tests/widgets/layout.spec.ts — 5 layout tests (vertical, horizontal, grid)
  • e2e/tests/widgets/card.spec.ts — 5 card tests

Config:

  • config.yaml — Added RustyWidgetE2e verification definition and added it to RustyFramework project

Commits

  • 9d44d94 [00260] Add widget E2E verification harness and Playwright tests

- Add static file serving and port-0 support to RustyServer
- Add serve_background() method for test use
- Create widget_harness binary with per-widget sample apps
- Create e2e/app/ with minimal WebSocket-based widget renderer
- Add Playwright E2E test specs for button, text, input, layout, card
- Add tower-http and clap dependencies
@rorychatt rorychatt merged commit b1212ab into main Apr 16, 2026
1 check passed
@rorychatt rorychatt deleted the tendril/00260-AddWidgetE2eVerificationToRustyFramework branch April 16, 2026 14:26
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