fix: resolve import errors and test failures after segment 4 merge

- Update BaseNodeData import path to dify_graph.entities.base_node_data
- Change NodeType.COMMAND/FILE_UPLOAD to BuiltinNodeTypes constants
- Fix system_oauth_encryption -> system_encryption rename in commands
- Remove tests for deleted agent runner modules
- Fix Avatar: named import + string size API in collaboration files
- Add missing skill feature deps: @monaco-editor/react, react-arborist,
  @tanstack/react-virtual
- Fix frontend test mocks: add useUserProfile, useLeaderRestoreListener,
  next/navigation mock, and nodeOutputVars to expected payload

Made-with: Cursor
This commit is contained in:
Novice
2026-03-23 13:59:09 +08:00
parent 5041d96bb1
commit a28f22e59d
40 changed files with 449 additions and 1720 deletions

View File

@ -84,6 +84,13 @@ vi.mock('next/dynamic', () => ({
default: () => () => null,
}))
vi.mock('next/navigation', () => ({
useParams: () => ({ appId: 'test-app-id' }),
useRouter: () => ({ push: vi.fn(), replace: vi.fn() }),
useSearchParams: () => new URLSearchParams(),
usePathname: () => '/app/test-app-id',
}))
vi.mock('reactflow', async () => {
const mod = await import('./reactflow-mock-state')
const base = mod.createReactFlowModuleMock()
@ -277,6 +284,7 @@ vi.mock('../hooks', () => ({
useWorkflowRefreshDraft: () => ({
handleRefreshWorkflowDraft: vi.fn(),
}),
useLeaderRestoreListener: vi.fn(),
}))
vi.mock('../hooks/use-workflow-search', () => ({