orca/tests
Jinjing 220811cbad
fix(e2e): repair release e2e suite (parking regression tests, stale/flaky specs, profile switcher gate) (#8486)
* fix(e2e): repair release e2e suite — parking regression tests, stale/flaky specs, profile switcher gate

Diagnosed 20 failing tests across the release e2e shards. Most are test debt,
plus two genuine product-side issues.

Product fixes:
- OrcaProfileSwitcher: the PROD gate hid the "Switch profile" button in the
  e2e build (electron-vite build bakes NODE_ENV=production). Exempt
  MODE==='e2e' so the specs render it while packaged prod builds stay hidden.

Parking cluster (8 tests): #8262 intentionally keeps the most-recently-hidden
tab warm (exempt from cold-park). The specs hid exactly one tab — always the
exempt one — so it never parked. Open a throwaway decoy tab that absorbs the
last-active exemption so the target parks. (terminal-hidden-view-parking,
terminal-pane-close-layout-consistency)

Stale tests updated to match intended product behavior:
- rich-markdown-link-bubble: match Edit link by aria-label (title dropped in #8307)
- terminal-codex-hidden-startup-background: drop the dead hiddenRendererSkipCount
  poll (Phase-4 main-side delivery gate #7214 bypasses that renderer path)

Brittle threshold/geometry/timing hardening (no product regression):
- agent-session-log-tail-stability: assert full-model length instead of a
  machine-specific word-wrap pixel baseline
- artificial-opencode revisit: dedicated under-backpressure latency bound
- terminal-history-size-typing-latency: gate p90 not max (tolerate one
  checkpoint-in-window spike; median stays strict)
- combined-diff-scroll-restore: assert viewport barely moved vs exact anchor key
- terminal-shortcuts: idempotent kitty-flag reset instead of a racing stack pop
- agent-session-live-force-exit-resume: drive the product quit-capture path
- renderer-crash-recovery-terminal-input: poll the transport probe over the
  recovery budget (still flags a permanently frozen pane)

terminal-push-delivery-loss-recovery left unchanged (no safe test-only
improvement; recovery is wall-clock bounded with ample slack).

* Extract shared parking helpers into terminal-hidden-parking.ts for e2e s

- Deduplicate waitForTabParked/parkHiddenTabBehindDecoy, previously
  copy-pasted across the parking and layout-consistency specs
- Parameterize parkDelayMs so the helper no longer depends on a
  file-local PARKING_DELAY_MS constant
2026-07-12 22:40:57 -07:00
..
e2e fix(e2e): repair release e2e suite (parking regression tests, stale/flaky specs, profile switcher gate) (#8486) 2026-07-12 22:40:57 -07:00
.gitignore feat: add idempotent E2E test suite with headless Electron support (#671) 2026-04-19 12:09:32 -07:00
playwright.config.ts Stabilize sharded e2e CI concurrency (#6312) 2026-06-24 18:39:02 -07:00