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 6249e3aee9..f1895f8e29 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
@@ -523,6 +523,33 @@ describe('InputField', () => {
})
})
+ it('should clear paragraph default state when switching to single file', async () => {
+ const user = userEvent.setup()
+ const onChange = vi.fn()
+
+ render(
+ ,
+ )
+
+ await user.click(screen.getByRole('button', { name: 'select-file' }))
+ 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')
+ })
+
it('should save file-list upload settings and max upload count', async () => {
const user = userEvent.setup()
const onChange = vi.fn()
@@ -551,4 +578,31 @@ describe('InputField', () => {
max_upload_count: 4,
})
})
+
+ it('should clear paragraph default state when switching to file-list', async () => {
+ const user = userEvent.setup()
+ const onChange = vi.fn()
+
+ render(
+ ,
+ )
+
+ await user.click(screen.getByRole('button', { name: 'select-file-list' }))
+ 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')
+ })
})