mirror of
https://github.com/langgenius/dify.git
synced 2026-01-19 03:35:06 +08:00
fix(test): add knowledgeName and knowledgeIcon to useWorkflowStore mock
Update test mock to include knowledgeName and knowledgeIcon in getState() return value to match the component's usage of getState() for lazy initialization.
This commit is contained in:
@ -92,6 +92,13 @@ vi.mock('@/app/components/workflow/store', () => {
|
||||
useWorkflowStore: () => ({
|
||||
getState: () => ({
|
||||
pipelineId: 'test-pipeline-id',
|
||||
knowledgeName: 'Test Knowledge',
|
||||
knowledgeIcon: {
|
||||
icon_type: 'emoji' as const,
|
||||
icon: '📚',
|
||||
icon_background: '#FFFFFF',
|
||||
icon_url: '',
|
||||
},
|
||||
setShowInputFieldPanel: mockSetShowInputFieldPanel,
|
||||
setShowEnvPanel: mockSetShowEnvPanel,
|
||||
setShowImportDSLModal: mockSetShowImportDSLModal,
|
||||
|
||||
@ -518,7 +518,7 @@
|
||||
},
|
||||
"app/components/app/configuration/prompt-value-panel/index.spec.tsx": {
|
||||
"ts/no-explicit-any": {
|
||||
"count": 3
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"app/components/app/configuration/prompt-value-panel/utils.ts": {
|
||||
@ -619,11 +619,6 @@
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"app/components/app/switch-app-modal/index.spec.tsx": {
|
||||
"ts/no-explicit-any": {
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"app/components/app/switch-app-modal/index.tsx": {
|
||||
"react-hooks-extra/no-direct-set-state-in-use-effect": {
|
||||
"count": 1
|
||||
@ -675,7 +670,7 @@
|
||||
},
|
||||
"app/components/apps/list.spec.tsx": {
|
||||
"ts/no-explicit-any": {
|
||||
"count": 9
|
||||
"count": 5
|
||||
}
|
||||
},
|
||||
"app/components/apps/list.tsx": {
|
||||
|
||||
Reference in New Issue
Block a user