mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-07-10 17:17:55 +00:00
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
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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()
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user