diff --git a/src/renderer/src/store/slices/ui.test.ts b/src/renderer/src/store/slices/ui.test.ts index 7d37ca10e..dfc3d9c33 100644 --- a/src/renderer/src/store/slices/ui.test.ts +++ b/src/renderer/src/store/slices/ui.test.ts @@ -3,15 +3,18 @@ import { describe, expect, it } from 'vitest' import { getDefaultUIState } from '../../../../shared/constants' import type { PersistedUIState } from '../../../../shared/types' import { createUISlice } from './ui' +import { createWorktreeNavHistorySlice } from './worktree-nav-history' import type { AppState } from '../types' function createUIStore(): StoreApi { // Only the UI slice, repo ids, and right sidebar width fallback are needed - // for persisted UI hydration tests. + // for persisted UI hydration tests. The worktree-nav-history slice is also + // included because openTaskPage records a Tasks visit via recordViewVisit. // eslint-disable-next-line @typescript-eslint/no-explicit-any return createStore()((...args: any[]) => ({ repos: [], rightSidebarWidth: 280, + ...createWorktreeNavHistorySlice(...(args as Parameters)), ...createUISlice(...(args as Parameters)) })) as unknown as StoreApi }