From 5022ee8979c1e85ffff2c8d7fda99272bbf1ec3b Mon Sep 17 00:00:00 2001 From: Nathaniel Parson Koroso Date: Wed, 8 Jul 2026 11:43:41 -0700 Subject: [PATCH] test: fix CI failures from the agent-panel seams - agentPanel.spec: the bare main.json import crashed Playwright's Node loader at collection time, failing every project; add the 'with { type: json }' attribute (same as WorkflowTabs.test) - WorkflowTabs.test: mock the agent panel store like the component's other stores; its new useAgentPanelStore() call threw no-active-pinia --- browser_tests/tests/agent/agentPanel.spec.ts | 2 +- src/components/topbar/WorkflowTabs.test.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/browser_tests/tests/agent/agentPanel.spec.ts b/browser_tests/tests/agent/agentPanel.spec.ts index e955458d66..403dd311ee 100644 --- a/browser_tests/tests/agent/agentPanel.spec.ts +++ b/browser_tests/tests/agent/agentPanel.spec.ts @@ -4,7 +4,7 @@ import { expect, mergeTests } from '@playwright/test' import { comfyPageFixture } from '@e2e/fixtures/ComfyPage' import { webSocketFixture } from '@e2e/fixtures/ws' -import enMessages from '@/locales/en/main.json' +import enMessages from '@/locales/en/main.json' with { type: 'json' } import type { AgentWsEvent } from '@/workbench/extensions/agent/schemas/agentApiSchema' import { diff --git a/src/components/topbar/WorkflowTabs.test.ts b/src/components/topbar/WorkflowTabs.test.ts index 85f2c03141..a92ed1cd4c 100644 --- a/src/components/topbar/WorkflowTabs.test.ts +++ b/src/components/topbar/WorkflowTabs.test.ts @@ -79,6 +79,11 @@ vi.mock('@/stores/workspaceStore', () => ({ useWorkspaceStore: () => ({ shiftDown: false }) })) +vi.mock('@/workbench/extensions/agent/stores/agent/agentPanelStore', () => ({ + useAgentPanelStore: () => + reactive({ isOpen: false, enabled: false, toggle: vi.fn() }) +})) + vi.mock('@/utils/mouseDownUtil', () => ({ whileMouseDown: vi.fn() }))