Infrastructure: - adapters/: base, tauri (port 9750), electrobun (port 9761 + PTY daemon) - helpers/: 120+ centralized selectors, reusable actions, custom assertions - wdio.shared.conf.js + stack-specific configs 18 unified specs (205 tests): splash(6) smoke(15) settings(19) terminal(14) agent(15) search(12) files(15) comms(10) tasks(10) theme(12) groups(12) keyboard(8) notifications(10) diagnostics(8) status-bar(12) context(9) worktree(8) llm-judged(10) Daemon: --stack tauri|electrobun|both flag Scripts: test:e2e:tauri, test:e2e:electrobun, test:e2e:both |
||
|---|---|---|
| .. | ||
| agent-bridge.ts | ||
| dashboard.ts | ||
| index.ts | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| runner.ts | ||
| tsconfig.json | ||
E2E Test Daemon
Terminal dashboard for running and monitoring Agent Orchestrator E2E tests. Supports smart caching, file watching, and agent SDK integration.
Prerequisites
- Built Tauri debug binary (
npm run tauri build -- --debug --no-bundle) tauri-driverinstalled (cargo install tauri-driver)- Node.js 20+
Install
cd tests/e2e/daemon
npm install
The daemon reuses WDIO deps from the root node_modules. Its own package.json lists @wdio/cli and @wdio/local-runner for clarity, but they resolve from the workspace root.
Usage
# Run all specs (with smart cache — skips recently-passed specs)
npm start
# Full run — reset cache, run everything
npm run start:full
# Filter by spec name pattern
npx tsx index.ts --spec phase-a
# Watch mode — re-run on spec file changes
npm run start:watch
# Agent mode — accept NDJSON queries on stdin, respond on stderr
npm run start:agent
# Combine flags
npx tsx index.ts --full --watch --agent
Dashboard
The terminal UI shows:
Agent Orchestrator — E2E Test Daemon RUNNING 12.3s
────────────────────────────────────────────
✓ smoke 1.2s
✓ workspace 0.8s
⟳ settings
· phase-a-structure
· phase-a-agent
⏭ phase-b-grid
────────────────────────────────────────────
2 passed │ 0 failed │ 1 skipped │ 1 running │ 2 pending │ 2.0s
Status icons:
✓green — passed✗red — failed (error message shown below)⏭gray — skipped (cached)⟳yellow — running·white — pending
Smart Cache
The daemon reads from the shared test-results/results.json (managed by results-db.ts). Specs that passed in any of the last 5 runs are skipped unless --full is used.
Agent Bridge Protocol
When started with --agent, the daemon accepts NDJSON queries on stdin and responds on stderr (stdout is used by the dashboard).
Queries
Status — get current test state:
{"type": "status"}
Response:
{"type": "status", "running": false, "passed": 15, "failed": 2, "skipped": 1, "pending": 0, "total": 18, "failures": [{"name": "phase-b-grid", "error": "WDIO exited with code 1"}]}
Rerun — trigger a new test run:
{"type": "rerun", "pattern": "phase-a"}
Response:
{"type": "rerun", "specsQueued": 1}
Failures — get detailed failure list:
{"type": "failures"}
Response:
{"type": "failures", "failures": [{"name": "phase-b-grid", "specFile": "phase-b-grid.test.ts", "error": "WDIO exited with code 1"}]}
Reset cache — clear smart cache:
{"type": "reset-cache"}
Response:
{"type": "reset-cache", "ok": true}
Architecture
index.ts CLI entry point, arg parsing, main loop
runner.ts WDIO Launcher wrapper, spec discovery, smart cache
dashboard.ts ANSI terminal UI (no external deps)
agent-bridge.ts NDJSON stdio interface for agent integration
The daemon reuses the project's existing wdio.conf.js and infra/results-db.ts.