diff --git a/web/app/components/workflow/nodes/human-input/components/__tests__/variable-in-markdown.spec.tsx b/web/app/components/workflow/nodes/human-input/components/__tests__/variable-in-markdown.spec.tsx index b036919bbd..212fc8713d 100644 --- a/web/app/components/workflow/nodes/human-input/components/__tests__/variable-in-markdown.spec.tsx +++ b/web/app/components/workflow/nodes/human-input/components/__tests__/variable-in-markdown.spec.tsx @@ -142,7 +142,7 @@ describe('variable-in-markdown', () => { expect(screen.getByText('Approved')).toBeInTheDocument() }) - it('should render variable source information for dynamic select inputs', () => { + it('should render dynamic select inputs as variable information without a select control', () => { render( { />, ) - expect(screen.getByTestId('human-input-note-select-preview')).toBeInTheDocument() + expect(screen.queryByTestId('human-input-note-select-preview')).not.toBeInTheDocument() + expect(screen.queryByRole('combobox', { name: 'human-input-note-select' })).not.toBeInTheDocument() expect(screen.getByText('{{Start Node/options}}')).toBeInTheDocument() }) diff --git a/web/app/components/workflow/nodes/human-input/components/variable-in-markdown.tsx b/web/app/components/workflow/nodes/human-input/components/variable-in-markdown.tsx index 54f4289a35..23e211b912 100644 --- a/web/app/components/workflow/nodes/human-input/components/variable-in-markdown.tsx +++ b/web/app/components/workflow/nodes/human-input/components/variable-in-markdown.tsx @@ -1,5 +1,4 @@ /* eslint-disable react-refresh/only-export-components */ -import type { ReactNode } from 'react' import type { FormInputItem } from '../types' import { cn } from '@langgenius/dify-ui/cn' import { Select, SelectContent, SelectItem, SelectItemIndicator, SelectItemText, SelectTrigger } from '@langgenius/dify-ui/select' @@ -150,14 +149,14 @@ export const Variable: React.FC<{ path: string }> = ({ path }) => { ) } -const SelectPreview: React.FC<{ label: string, options: string[], triggerContent?: ReactNode }> = ({ label, options, triggerContent }) => { +const SelectPreview: React.FC<{ label: string, options: string[] }> = ({ label, options }) => { const [value, setValue] = React.useState(options[0] || label) return (