From 01528f7392abc9d52d662285ac1510791c320e8e Mon Sep 17 00:00:00 2001
From: Haohao-end <2227625024@qq.com>
Date: Sun, 15 Mar 2026 19:01:06 +0800
Subject: [PATCH] fix(web): satisfy agent panel spec types
---
.../workflow/nodes/agent/panel.spec.tsx | 22 +++++++++----------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/web/app/components/workflow/nodes/agent/panel.spec.tsx b/web/app/components/workflow/nodes/agent/panel.spec.tsx
index 2967d24c8c..1884a4dc0e 100644
--- a/web/app/components/workflow/nodes/agent/panel.spec.tsx
+++ b/web/app/components/workflow/nodes/agent/panel.spec.tsx
@@ -16,6 +16,10 @@ import AgentPanel from './panel'
// Mock setInputs at the top level
const mockSetInputs = vi.fn()
+// Stub for panelProps - using any to avoid complex type requirements in test
+// eslint-disable-next-line ts/no-explicit-any
+const mockPanelProps = {} as any
+
// Capture FormInputBoolean's onChange callback
let capturedOnChange: ((value: boolean) => void) | null = null
@@ -104,15 +108,13 @@ describe('AgentPanel - Enable Human Clarification', () => {
})
it('should call setInputs with enable_human_clarification=true when onChange is triggered with true', () => {
- const mockData: AgentNodeType = {
- id: 'test-node',
- data: {},
- }
+ const mockData = {} as AgentNodeType
render(
,
)
@@ -127,15 +129,13 @@ describe('AgentPanel - Enable Human Clarification', () => {
})
it('should call setInputs with enable_human_clarification=false when onChange is triggered with false', () => {
- const mockData: AgentNodeType = {
- id: 'test-node',
- data: {},
- }
+ const mockData = {} as AgentNodeType
render(
,
)
@@ -150,15 +150,13 @@ describe('AgentPanel - Enable Human Clarification', () => {
})
it('should preserve other inputs when updating enable_human_clarification', () => {
- const mockData: AgentNodeType = {
- id: 'test-node',
- data: {},
- }
+ const mockData = {} as AgentNodeType
render(
,
)