Skip to content

Commit c8abe7b

Browse files
fix(e2e): clear the document file input after sending
Native file inputs only fire onChange when their value changes, so re-selecting the same PDF in the harness did nothing. Clears the input's value after the send callback runs. Document input only, per review scope.
1 parent e5d210e commit c8abe7b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

testing/e2e/src/components/ChatUI.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,9 @@ export function ChatUI({
278278
if (file && text && onSendMessageWithDocument) {
279279
onSendMessageWithDocument(text, file)
280280
setInput('')
281+
// Clear the file input so re-selecting the same PDF fires
282+
// onChange again.
283+
e.target.value = ''
281284
}
282285
}}
283286
/>

0 commit comments

Comments
 (0)