diff --git a/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/input-field.spec.tsx b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/input-field.spec.tsx index 8394d6468e..b9a7cd6499 100644 --- a/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/input-field.spec.tsx +++ b/web/app/components/base/prompt-editor/plugins/hitl-input-block/__tests__/input-field.spec.tsx @@ -444,4 +444,31 @@ describe('InputField', () => { expect(lastVarReferencePickerProps?.filterVar?.({ type: VarType.string })).toBe(false) expect(lastVarReferencePickerProps?.filterVar?.({ type: VarType.arrayFile })).toBe(false) }) + + it('should clear paragraph default state when switching to select', async () => { + const user = userEvent.setup() + const onChange = vi.fn() + + render( + , + ) + + await user.click(screen.getByRole('button', { name: 'select-select' })) + await user.click(screen.getByRole('button', { name: /workflow\.nodes\.humanInput\.insertInputField\.insert/i })) + + expect(onChange).toHaveBeenCalledTimes(1) + expect(onChange.mock.calls[0]![0]).not.toHaveProperty('default') + }) })