mirror of https://github.com/langgenius/dify.git
fix(api): resolve NodeType reference in clarification helper test
This commit is contained in:
parent
f96dc692e6
commit
6cfbb2fc76
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue