-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation for simulate is minimal and dblclick event is named doubleclick #310
Comments
You're simulating React events, not DOM events, which is why |
I see, so it has to do with react's event system which is why the function is called nativeToReactEventMap: export function mapNativeEventNames(event) {
const nativeToReactEventMap = {
compositionend: 'compositionEnd', Of course, well that makes sense now :) Two things:
It seems like documentation is the only thing missing here. |
Since it's "native" to "react event" map, the "native" should match native - so I think that the key in https://github.com/airbnb/enzyme/blob/699ec7e39560a68c198ecf80b59d177d003fc869/src/Utils.js#L230 should indeed be changed to "dblclick" to match user expectations. |
Yeah ok, gotcha. |
I tried to simulate a double click like this:
Because the documentation for simulate seems to suggest dom events are used.
I'm pretty sure (although could be wrong) that the dom event for double click is dblclick.
Then I looked through the repo and found mentions of
doubleclick
, and doing this:works.
So it would be good to have a list of simulated events other than click because that's in every tut and example but there's no documentation about the list of events that can be simulated.
Does this have something to do with it?
The text was updated successfully, but these errors were encountered: