Last active
August 29, 2015 13:55
-
-
Save lucaspottersky/8775075 to your computer and use it in GitHub Desktop.
Ember testing with ctrl+click using simulate lib.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find('#my-element').simulate('click', { ctrlKey: true }); | |
// I think this is not right. The Route might not have finished transitioning yet. | |
equal(currentRouteName(), 'inbox.index', "Did not redirect to inbox index route"); | |
// Maybe I should register an async helper??? | |
Ember.Test.registerAsyncHelper('click-with-modifiers', function(app, value) { | |
findWithAssert(value).simulate('click', { ctrlKey: true }); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment