Skip to content
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

Mechanism to dispatch native browser events #73

Closed
csnover opened this issue Jan 2, 2011 · 9 comments
Closed

Mechanism to dispatch native browser events #73

csnover opened this issue Jan 2, 2011 · 9 comments
Labels
Category: API Type: Meta Seek input from maintainers and contributors.

Comments

@csnover
Copy link

csnover commented Jan 2, 2011

It would be nice if QUnit had a mechanism that would allow for easy dispatching of native browser events on elements instead of needing to reinvent the wheel for every test suite that needs to test events. Right now, for instance, the vast majority of jQuery unit tests are only testing the jQuery event system and don’t actually ever confirm that native browser events will work the same way.

@jzaefferer
Copy link
Member

Any suggestions on how that should work? Are you looking for something like simulate.js?

@csnover
Copy link
Author

csnover commented Jan 4, 2011

Yep, pretty much something exactly like that. (UI always seems to be one step ahead. :)) I think that this would have application for pretty much anyone writing interactivity tests using QUnit, not just jQuery.

@jzaefferer
Copy link
Member

Marc ripped simulate.js apart a bit: http://marcgrabanski.com/articles/simulating-mouse-click-events-in-javascript

@jzaefferer
Copy link
Member

Scott says we should port the DOH Robot instead: http://dojotoolkit.org/reference-guide/util/dohrobot.html

@jzaefferer
Copy link
Member

Josh's keymasher plugin: https://github.com/digitalBush/jquery.keymasher

@sstok
Copy link

sstok commented Oct 29, 2011

I'm a big fan of FuncUnit.
It uses Syn.JS for simulating events: https://github.com/jupiterjs/syn

And is largely based on QUnit.

@wwalser
Copy link
Contributor

wwalser commented Oct 31, 2011

Ephox also implemented the a similar thing with https://github.com/ephox/JSRobot/. Having used it, I doubt if the API is as strong as dohrobot.

If you want native events you're pretty much going to have to go with a solution that uses a java applet to create those native events. Simulate comes close, but it'll never actually measure up 100%.

@jzaefferer
Copy link
Member

Making this a documentation ticket. There are various options, where both JSRobot and syn look the most interesting. QUnit docs should reference those, beyond that I don't see anything we can really do here, its out of scope.

@jzaefferer
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: API Type: Meta Seek input from maintainers and contributors.
Development

No branches or pull requests

5 participants