feat: unified E2E testing engine — 205 tests, dual-stack support

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
This commit is contained in:
Hibryda 2026-03-22 05:27:36 +01:00
parent 1995f03682
commit 77b9ce9f62
31 changed files with 3547 additions and 344 deletions

View file

@ -1,12 +1,12 @@
#!/usr/bin/env tsx
// Agent Orchestrator E2E Test Daemon — CLI entry point
// Usage: tsx index.ts [--full] [--spec <pattern>] [--watch] [--agent]
// Usage: tsx index.ts [--full] [--spec <pattern>] [--watch] [--agent] [--stack tauri|electrobun|both]
import { resolve, dirname } from 'node:path';
import { fileURLToPath } from 'node:url';
import { watch } from 'node:fs';
import { Dashboard } from './dashboard.ts';
import { runSpecs, discoverSpecs, specDisplayName, clearCache, type RunOptions } from './runner.ts';
import { runSpecs, discoverSpecs, specDisplayName, clearCache, type RunOptions, type StackTarget } from './runner.ts';
import { AgentBridge } from './agent-bridge.ts';
const __dirname = dirname(fileURLToPath(import.meta.url));
@ -19,6 +19,18 @@ const watchMode = args.includes('--watch');
const agentMode = args.includes('--agent');
const specIdx = args.indexOf('--spec');
const specPattern = specIdx !== -1 ? args[specIdx + 1] : undefined;
const stackIdx = args.indexOf('--stack');
const stackTarget: StackTarget = stackIdx !== -1
? (args[stackIdx + 1] as StackTarget) ?? 'tauri'
: 'tauri';
// Validate stack target
if (!['tauri', 'electrobun', 'both'].includes(stackTarget)) {
console.error(`Invalid --stack value: ${stackTarget}. Use: tauri, electrobun, or both`);
process.exit(1);
}
console.log(`E2E Test Daemon — stack: ${stackTarget}`);
// ── Init ──
const dashboard = new Dashboard();
@ -41,6 +53,7 @@ async function runCycle(opts: RunOptions = {}): Promise<void> {
await runSpecs({
pattern: opts.pattern ?? specPattern,
full: opts.full ?? fullMode,
stack: opts.stack ?? stackTarget,
onResult: (r) => dashboard.updateTest(r.name, r.status, r.durationMs, r.error),
});