fix(e2e): compare store repo paths with normalized separators on Windows

The shared orca-app fixture compares the store's forward-slash-normalized
repo/worktree paths against the Node-side C:\ form with strict equality,
so every fixture-based spec dies during boot on Windows before reaching
its assertions. Normalize the host path once and use it for the three
store comparisons; repos.add() keeps the native form.
This commit is contained in:
Brennan Benson
2026-07-13 01:26:57 -07:00
parent 0b65d725c9
commit 79a5696cff
+6 -3
View File
@@ -280,6 +280,9 @@ export const test = base.extend<OrcaTestFixtures, OrcaWorkerFixtures>({
}
const repoPath = isValidGitRepo(testRepoPath) ? testRepoPath : createSeededTestRepo()
// Why: the store returns forward-slash-normalized paths on Windows, so
// comparing against the Node-side C:\ form fails every fixture boot there.
const storeRepoPath = repoPath.replace(/\\/g, '/')
// Add the test repo via the IPC bridge
// Why: calling window.api.repos.add() goes through the same code path as
@@ -314,7 +317,7 @@ export const test = base.extend<OrcaTestFixtures, OrcaWorkerFixtures>({
// repos hide those by default after the visibility rollout.
await store.getState().updateRepo(repo.id, { externalWorktreeVisibility: 'show' })
return true
}, repoPath),
}, storeRepoPath),
{
timeout: 30_000,
message: `Expected e2e repo to be loaded: ${repoPath}`
@@ -356,7 +359,7 @@ export const test = base.extend<OrcaTestFixtures, OrcaWorkerFixtures>({
}
await store.getState().fetchWorktrees(repo.id)
return store.getState().worktreesByRepo[repo.id]?.length ?? 0
}, repoPath),
}, storeRepoPath),
{
timeout: 30_000,
message: 'seeded e2e worktrees did not load'
@@ -392,7 +395,7 @@ export const test = base.extend<OrcaTestFixtures, OrcaWorkerFixtures>({
if (testWorktree) {
state.setActiveWorktree(testWorktree.id)
}
}, repoPath)
}, storeRepoPath)
// Best-effort seed of a baseline terminal tab when a fresh isolated
// profile has none yet.