mirror of
https://github.com/stablyai/orca.git
synced 2026-11-01 17:47:40 +00:00
2.4 KiB
2.4 KiB
E2E Tests
Build and Run
ORCA_BACKGROUND_LAUNCH=1 pnpm run test:e2ebuilds with--mode e2e, which exposeswindow.__store.- For iteration, build with
pnpm exec electron-vite build --mode e2e, then runORCA_BACKGROUND_LAUNCH=1 SKIP_BUILD=1 pnpm run test:e2e …only while that build is current. A plain build omitswindow.__store; if tests time out waiting for it, rebuild in E2E mode before changing the harness.
Choose the Test Boundary
- Test pure store logic in
src/renderer/src/store/slices/*.test.tswithcreateTestAppStore(). Use E2E for real UI events, IPC, persistence/restarts, or Electron lifecycle interactions. - Use
window.__storefor setup; assert user-visible behavior through the DOM (getByRole,toBeVisible,toHaveText). Writing state and reading it back cannot catch broken rendering. This applies to hidden CDP-driven renderers too.
Layout Regression Gates
- Terminal-topology refactors must preserve behavior or fix a named bug. Run
ORCA_BACKGROUND_LAUNCH=1 pnpm run test:e2e:terminal-layout-parityto compare the working tree with its merge-base onorigin/main. See the runner for commit comparisons and scenario filters. The head's journeys must work against both builds. - Declare intended fixes in declared differences
with scenario, bug ID, and report path prefixes; undeclared or unmatched declarations fail.
Preserve PTY-binding and main/renderer agreement waits before quitting. Unstable-on-main
exclusions need evidence in
TERMINAL_LAYOUT_PARITY_UNSTABLE_ON_MAIN. - Use the window and headless layout oracles for live/saved layout, DOM/client agreement, command effects, restarts, terminal output, and remount checks. Latency measurements are informational.
- New known-on-main entries must cite a reproducing
run on
mainin the PR; rerun intermittent findings until reproduced. UseORCA_LAYOUT_ORACLE_REPEAT=<n>for repeats andORCA_LAYOUT_ORACLE_REPORT_DIRfor JSON reports.ORCA_LAYOUT_ORACLE_RECORD=1records without failing; do not use it as a passing gate. - Inspect any profile with
node config/scripts/check-workspace-layout-rules.mjs <userDataDir>.