Repository navigation
test(e2e): cover worktree lifecycle and tab-close navigation - #846
Merged
Merged
Conversation
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.
enrick-dev
pushed a commit
to enrick-dev/orca
that referenced
this pull request
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two new Playwright specs covering high-regression areas identified from the last 200 PRs on
main.tests/e2e/worktree-lifecycle.spec.tsclean up editor/terminal state when removing a worktree).tests/e2e/tab-close-navigation.spec.tsclose editor/diff tabs should navigate to visual neighbor tab).activeWorktreeId === null) — guards PR fix: return to Orca landing screen after closing last terminal #677 and theshouldDeactivateWorktreebranch incloseFile/closeUnifiedTab.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:e2epasses locally for both new specs on macOS.pnpm run test:e2epasses in CI (headless Electron).