From 616f026f4223bebc74d4b3ae75205019c59f86aa Mon Sep 17 00:00:00 2001 From: Naiyuan Qing <145280634+NevilleQingNY@users.noreply.github.com> Date: Tue, 24 Mar 2026 16:09:44 +0800 Subject: [PATCH] fix(web): update pair/local test mocks for new store imports Co-Authored-By: Claude Opus 4.6 (1M context) --- apps/web/app/pair/local/page.test.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/web/app/pair/local/page.test.tsx b/apps/web/app/pair/local/page.test.tsx index f4096865..38ec775b 100644 --- a/apps/web/app/pair/local/page.test.tsx +++ b/apps/web/app/pair/local/page.test.tsx @@ -56,15 +56,21 @@ vi.mock("next/navigation", () => ({ useSearchParams: () => new URLSearchParams("token=test-token"), })); -vi.mock("../../../lib/api", () => ({ +vi.mock("@/shared/api", () => ({ api: { getDaemonPairingSession: mockGetDaemonPairingSession, approveDaemonPairingSession: mockApproveDaemonPairingSession, }, })); -vi.mock("../../../lib/auth-context", () => ({ - useAuth: () => mockAuthValue, +vi.mock("@/features/auth", () => ({ + useAuthStore: (selector: (s: any) => any) => + selector(mockAuthValue), +})); + +vi.mock("@/features/workspace", () => ({ + useWorkspaceStore: (selector: (s: any) => any) => + selector(mockAuthValue), })); import LocalDaemonPairPage from "./page";