Skip to content

Adding mouseOut and mouseOver native events #42

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

Merged
merged 2 commits into from
May 3, 2015

Conversation

jayudey-wf
Copy link
Contributor

While working with the dart react test utils it was discovered that it was necessary to simulate some native events in order to initiate a mouseEnter or mouseLeave event during testing.

In this work, the necessary events events were added in order to create those events within the dart react test utils.

issue originally documented - http://stackoverflow.com/questions/24140773/could-not-simulate-mouseenter-event-using-react-test-utils

@hleumas
Copy link
Contributor

hleumas commented Apr 30, 2015

I am not sure @jayudey-wf , isn't this already solved by facebook/react#1366 ? And how does SimulateNative work in the react code exactly? Does it support only these two methods?

I haven't dived into the topic deeply, so I would appreciate if you could provide better explanation of the situation.

Thanks:)

@jayudey-wf
Copy link
Contributor Author

I don't believe that facebook/react#1366 will solve my issue. That was an update to the way that the react synthetic event is handled.

Synthetic events are the result of using Simulate and are created from a cross browser wrapper of an event, where as the SimulateNative events are generic browser events. Synthetic events are used within React and allow it to be more browser compatible ( https://facebook.github.io/react/docs/events.html ).

The component that I am testing however responds to an actual browser emitted event which is why I need a SimulateNative event rather then a Native synthetic event.

I went in and added as well what seem to be all the supported native events.

hleumas added a commit that referenced this pull request May 3, 2015
Adding mouseOut and mouseOver native events
@hleumas hleumas merged commit 04952f2 into Workiva:master May 3, 2015
@hleumas
Copy link
Contributor

hleumas commented May 3, 2015

@jayudey-wf thanks for the patch, merged and published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants