tools/ui/ — scripts + Playwright config that let Claude Code (and
humans) drive the Flutter WASM build in a real browser. The point is
to avoid screenshot round-trips: every interactive widget in clide
ships a Semantics wrapper anyway (a11y requirement), so the automation
layer just queries the `flt-semantics[aria-label]` DOM.
* build.sh — `flutter build web --wasm` from app/
* serve.sh — `python3 -m http.server 4280` in the background.
Before binding, kills any stale listener on the port (orphans
from earlier failed runs no longer accumulate).
* stop.sh — port-based kill; escalates to SIGKILL after 300ms.
The pidfile is now advisory — port ownership is the source of
truth.
* driver.ts — `ClideDriver` class with `byLabel`, `click`, `type`,
`readText`, `screenshot`, `dumpSemanticsTree`, and
`waitUntilReady` that auto-clicks the `flt-semantics-placeholder`
so the semantic tree is populated before queries.
* tests/smoke.spec.ts — first driver test; asserts welcome +
disconnected labels surface in the Semantics DOM.
Co-Authored-By: Claude <noreply@anthropic.com>
16 lines
414 B
JSON
16 lines
414 B
JSON
{
|
|
"name": "clide-ui-harness",
|
|
"description": "Playwright harness Claude Code uses to drive the Flutter web WASM build of clide.",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"test": "playwright test",
|
|
"test:headed": "playwright test --headed",
|
|
"install-browsers": "playwright install chromium"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "1.50.0",
|
|
"typescript": "5.6.3"
|
|
}
|
|
}
|