Compare commits

...

1 Commits

Author SHA1 Message Date
Jiayuan Zhang
955fafda15 fix(tests): add squad mocks to unblock views test suite (MUL-2158)
PR #2505 (Squad MVP) wired AssigneePicker through `squadListOptions`
and added a Squads entry to the workspace nav, but did not update the
two test fixtures that mirror `@multica/core/workspace/queries` and
`useWorkspacePaths`. After the merge:

- issues/components/issue-detail.test.tsx — 10/14 cases failed because
  AssigneePicker threw at render when the mock lacked `squadListOptions`.
- layout/app-sidebar.test.tsx — 3/3 PinRow cases failed because the
  workspace nav now references `p.squads()`, missing from the path mock.

Add the two missing mock entries. No production code changes.

Co-authored-by: multica-agent <github@multica.ai>
2026-05-13 19:43:18 +08:00
2 changed files with 5 additions and 0 deletions

View File

@@ -66,6 +66,10 @@ vi.mock("@multica/core/workspace/queries", () => ({
queryKey: ["workspaces", "ws-1", "agents"],
queryFn: () => Promise.resolve([]),
}),
squadListOptions: () => ({
queryKey: ["workspaces", "ws-1", "squads"],
queryFn: () => Promise.resolve([]),
}),
assigneeFrequencyOptions: () => ({
queryKey: ["workspaces", "ws-1", "assignee-frequency"],
queryFn: () => Promise.resolve([]),

View File

@@ -90,6 +90,7 @@ vi.mock("@multica/core/paths", () => ({
projects: () => "/acme/projects",
autopilots: () => "/acme/autopilots",
agents: () => "/acme/agents",
squads: () => "/acme/squads",
usage: () => "/acme/usage",
runtimes: () => "/acme/runtimes",
skills: () => "/acme/skills",