test: update mock stores for batch selection in existing canvas tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hongming Wang 2026-04-18 01:22:25 -07:00
parent 6de705b2a1
commit e3d22cf2ff
4 changed files with 13 additions and 0 deletions

View File

@ -69,6 +69,9 @@ const mockStoreState = {
showA2AEdges: false,
setShowA2AEdges: vi.fn(),
setPanelTab: vi.fn(),
selectedNodeIds: new Set<string>(),
clearSelection: vi.fn(),
toggleNodeSelection: vi.fn(),
};
vi.mock("@/store/canvas", () => ({
@ -109,6 +112,7 @@ vi.mock("../ProvisioningTimeout", () => ({
<div data-testid="provisioning-timeout-sentinel" />
),
}));
vi.mock("../BatchActionBar", () => ({ BatchActionBar: () => null }));
// ── Import the component under test AFTER mocks ───────────────────────────────
import { Canvas } from "../Canvas";

View File

@ -79,6 +79,9 @@ const mockStoreState = {
showA2AEdges: false,
setShowA2AEdges: vi.fn(),
setPanelTab: vi.fn(),
selectedNodeIds: new Set<string>(),
clearSelection: vi.fn(),
toggleNodeSelection: vi.fn(),
};
vi.mock("@/store/canvas", () => ({
@ -113,6 +116,8 @@ vi.mock("../settings", () => ({
}));
vi.mock("../Toaster", () => ({ Toaster: () => null }));
vi.mock("../WorkspaceNode", () => ({ WorkspaceNode: () => null }));
vi.mock("../BatchActionBar", () => ({ BatchActionBar: () => null }));
vi.mock("../ProvisioningTimeout", () => ({ ProvisioningTimeout: () => null }));
import { Canvas } from "../Canvas";

View File

@ -125,6 +125,8 @@ const mockStoreState = {
nestNode: mockNestNode,
restartWorkspace: vi.fn(() => Promise.resolve()),
setPanelTab: vi.fn(),
selectedNodeIds: new Set<string>(),
toggleNodeSelection: vi.fn(),
};
vi.mock("@/store/canvas", () => ({

View File

@ -97,6 +97,8 @@ const mockStoreState = {
isDescendant: vi.fn(() => false),
restartWorkspace: vi.fn(),
setPanelTab: vi.fn(),
selectedNodeIds: new Set<string>(),
toggleNodeSelection: vi.fn(),
};
vi.mock("@/store/canvas", () => ({