diff --git a/web/app/components/rag-pipeline/hooks/use-pipeline-run.spec.ts b/web/app/components/rag-pipeline/hooks/use-pipeline-run.spec.ts index 2b21001839..c8a4a0ebb7 100644 --- a/web/app/components/rag-pipeline/hooks/use-pipeline-run.spec.ts +++ b/web/app/components/rag-pipeline/hooks/use-pipeline-run.spec.ts @@ -92,8 +92,10 @@ vi.mock('@/service/workflow', () => ({ })) const mockInvalidAllLastRun = vi.fn() +const mockInvalidateRunHistory = vi.fn() vi.mock('@/service/use-workflow', () => ({ useInvalidAllLastRun: () => mockInvalidAllLastRun, + useInvalidateWorkflowRunHistory: () => mockInvalidateRunHistory, })) // Mock FlowType @@ -472,6 +474,7 @@ describe('usePipelineRun', () => { }) expect(onWorkflowStarted).toHaveBeenCalledWith({ task_id: 'task-1' }) + expect(mockInvalidateRunHistory).toHaveBeenCalled() }) it('should call onWorkflowFinished callback when provided', async () => { @@ -493,6 +496,7 @@ describe('usePipelineRun', () => { }) expect(onWorkflowFinished).toHaveBeenCalledWith({ status: 'succeeded' }) + expect(mockInvalidateRunHistory).toHaveBeenCalled() }) it('should call onError callback when provided', async () => { @@ -514,6 +518,7 @@ describe('usePipelineRun', () => { }) expect(onError).toHaveBeenCalledWith({ message: 'error' }) + expect(mockInvalidateRunHistory).toHaveBeenCalled() }) it('should call onNodeStarted callback when provided', async () => { diff --git a/web/eslint-suppressions.json b/web/eslint-suppressions.json index 9293446c0c..a939fd7d2f 100644 --- a/web/eslint-suppressions.json +++ b/web/eslint-suppressions.json @@ -2299,7 +2299,7 @@ }, "app/components/base/markdown-blocks/code-block.tsx": { "react-hooks-extra/no-direct-set-state-in-use-effect": { - "count": 10 + "count": 7 }, "tailwindcss/enforce-consistent-class-order": { "count": 1