Origem: D:/Documents/Github/PiAgentUI/PiAgentUi Arquivos omitidos (segredos, bancos de dados, logs, >50 MB): 4
45 lines
1.5 KiB
Markdown
45 lines
1.5 KiB
Markdown
# 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_service` command 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_DIR` and `PI_CODING_AGENT_SESSION_DIR` values.
|
|
- 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:
|
|
|
|
```sh
|
|
cargo install tauri-driver --locked
|
|
```
|
|
|
|
Run the suite:
|
|
|
|
```sh
|
|
npm run test:e2e
|
|
```
|
|
|
|
If a debug Tauri binary already exists, skip the build step:
|
|
|
|
```sh
|
|
npm run test:e2e:skip-build
|
|
```
|
|
|
|
Useful environment variables:
|
|
|
|
- `TAURI_DRIVER` — explicit path to `tauri-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.
|