Skip to content

test(e2e): cover worktree lifecycle and tab-close navigation - #846

Merged
brennanb2025 merged 3 commits into
mainfrom
brennanb2025/more-playwright-tests
Apr 19, 2026
Merged

brennanb2025 merged 3 commits into
mainfrom
brennanb2025/more-playwright-tests

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Apr 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds two new Playwright specs covering high-regression areas identified from the last 200 PRs on main.

tests/e2e/worktree-lifecycle.spec.ts

tests/e2e/tab-close-navigation.spec.ts

Both specs drive the Zustand store directly through window.__store, matching the pattern used by existing specs (worktree.spec.ts, tabs.spec.ts, etc.) so they run cleanly in headless Electron.

Test plan

  • pnpm run test:e2e passes locally for both new specs on macOS.
  • pnpm run test:e2e passes in CI (headless Electron).
  • oxlint clean on both files (verified locally).

Adds Playwright coverage for two high-regression areas identified from the
last 200 PRs:

- worktree-lifecycle.spec.ts: guards removeWorktree cleanup (#532),
  worktree switch with right sidebar open (#598/#628/#726), and
  cross-worktree tab isolation (#542/#554).
- tab-close-navigation.spec.ts: guards visual-neighbor activation on
  editor/diff close (#693) and Landing fallback when the last visible
  surface closes (#677).
Make openSeededEditorTabs take worktreeId explicitly so tests don't
depend on activeWorktreeId (which the Landing test deliberately clears).
Tighten neighbor-picking assertions to the exact file IDs closeFile
selects, so PR #693's regression would actually fail instead of passing
any "some open file is active" check. Narrow the worktree-switch test
to what a store-level spec can actually observe (per-worktree state
preservation across a round-trip) instead of claiming to detect
renderer hangs it can't see.
Auto-review pass: add afterEach cleanup so the removal test doesn't leak
real on-disk worktrees in the worker-scoped seed repo when mid-test
assertions fail, replace test.skip with expect() so fixture regressions
fail loudly, drop non-null assertions on getActiveWorktreeId in favor of
waitForActiveWorktree, and apply defensive store guards consistently
inside page.evaluate blocks.
@brennanb2025
brennanb2025 merged commit 08b0a30 into main Apr 19, 2026
2 checks passed
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant