Reproduction example
https://codesandbox.io/s/sad-david-5wel5v?file=/src/App.test.js
Prerequisites
- Render an file input where
accept was configured with command AND space (, ), e.g.
<input type="file" accept="image/png, image/jpeg" />
- Trigger
userEvent.upload(...) on this input with a file type that matches the accept.
Expected behavior
onChange event should be triggered on the input and input.files should be updated.
Actual behavior
Neither input.files is updated nor onChange was fired.
User-event version
14.4.3
Environment
Testing Library framework:
JS framework:
Test environment:
DOM implementation:
Additional context
The accept attribute on file input does accept file types separated by command + space, both in terms of web standard and what browsers can actually handle.
Reproduction example
https://codesandbox.io/s/sad-david-5wel5v?file=/src/App.test.js
Prerequisites
acceptwas configured with command AND space (,), e.g.userEvent.upload(...)on this input with a file type that matches theaccept.Expected behavior
onChangeevent should be triggered on the input andinput.filesshould be updated.Actual behavior
Neither
input.filesis updated noronChangewas fired.User-event version
14.4.3
Environment
Testing Library framework:
JS framework:
Test environment:
DOM implementation:
Additional context
The
acceptattribute on file input does accept file types separated by command + space, both in terms of web standard and what browsers can actually handle.