-
Notifications
You must be signed in to change notification settings - Fork 255
Closed
Labels
Description
Reproduction example
https://codesandbox.io/s/compassionate-thunder-7dgq11?file=/src/App.test.js
Prerequisites
- render
<input type="file" accept=".xlsx" onChange={handleFileChange} /> - try uploading file that is not one of the accepted types
Expected behavior
onChange is called
Actual behavior
onChange is not called
User-event version
14.0.4
Environment
No response
Additional context
It's still easy to bypass browsers accepted file types by user. So I want to test if error returned by back-end (mocked with MSW) is shown.

found this #421 where people seemed to agree that allowing uploading all types is way to go.
And this used to work with v13: https://codesandbox.io/s/nameless-platform-qnw290?file=/src/App.test.js
Seems upload used to have options, where applyAccept was defaulting to false. In changelog it's only mentioned that options was removed, but not that default has changed (and contradicts browser behavior)