Origem: D:/Documents/Github/PiAgentUI/PiAgentUi Arquivos omitidos (segredos, bancos de dados, logs, >50 MB): 4
1.5 KiB
1.5 KiB
PiAgentUI desktop E2E tests
This suite uses Tauri's official WebDriver path (tauri-driver) with WebdriverIO.
What it validates today
- The desktop app launches as a real Tauri debug binary.
- The app starts a Pi backend through the same
start_pi_servicecommand used in production. - Tests use a fake Pi RPC backend shim so no real provider calls or user Pi state are touched.
- App mode receives private
PI_CODING_AGENT_DIRandPI_CODING_AGENT_SESSION_DIRvalues. - First-run provider onboarding appears when no provider auth exists.
- Provider catalog search works.
- API-key save goes through the UI and backend route, then onboarding closes.
Local setup
Install the Tauri WebDriver bridge once:
cargo install tauri-driver --locked
Run the suite:
npm run test:e2e
If a debug Tauri binary already exists, skip the build step:
npm run test:e2e:skip-build
Useful environment variables:
TAURI_DRIVER— explicit path totauri-driver.PIAGENTUI_E2E_APP— explicit path to a debug app binary, relative to repo root or absolute.PIAGENTUI_E2E_KEEP_TMP=1— keep temp app/runtime dirs for debugging.PIAGENTUI_E2E_LOG_LEVEL=info— increase WebdriverIO logging.
Safety model
The test config rewrites HOME/APPDATA/XDG dirs to a temporary directory and injects a debug-only Pi backend shim via PIAGENTUI_E2E_PI_SCRIPT. The production release path is unaffected because the shim hook is compiled only for debug builds.