fix(api): resolve NodeType reference in clarification helper test

This commit is contained in:
Haohao-end 2026-03-15 18:02:45 +08:00
parent f96dc692e6
commit 6cfbb2fc76
2 changed files with 5 additions and 6 deletions

View File

@ -9,7 +9,6 @@ from core.workflow.nodes.agent.clarification_helper import (
should_enable_clarification,
)
from core.workflow.nodes.agent.entities import AgentNodeData
from dify_graph.enums import NodeType
@pytest.fixture
@ -17,7 +16,7 @@ def base_node_data_args() -> dict:
"""Fixture providing base arguments for AgentNodeData construction."""
return {
"id": "test_node",
"type": NodeType.AGENT,
"type": "agent",
"agent_strategy_provider_name": "test_provider",
"agent_strategy_name": "test_strategy",
"agent_strategy_label": "Test Strategy",

View File

@ -91,7 +91,7 @@ vi.mock('../_base/components/split', () => ({
// Mock FormInputBoolean to capture onChange callback
vi.mock('../_base/components/form-input-boolean', () => ({
default: ({ onChange }: { value: boolean; onChange: (value: boolean) => void }) => {
default: ({ onChange }: { value: boolean, onChange: (value: boolean) => void }) => {
capturedOnChange = onChange
return <div data-testid="form-input-boolean" />
},
@ -107,7 +107,7 @@ describe('AgentPanel - Enable Human Clarification', () => {
const mockData: AgentNodeType = {
id: 'test-node',
data: {},
} as any
}
render(
<AgentPanel
@ -130,7 +130,7 @@ describe('AgentPanel - Enable Human Clarification', () => {
const mockData: AgentNodeType = {
id: 'test-node',
data: {},
} as any
}
render(
<AgentPanel
@ -153,7 +153,7 @@ describe('AgentPanel - Enable Human Clarification', () => {
const mockData: AgentNodeType = {
id: 'test-node',
data: {},
} as any
}
render(
<AgentPanel