Skip to content

Instantly share code, notes, and snippets.

@lucaspottersky
Last active August 29, 2015 13:55
Show Gist options
  • Save lucaspottersky/8775075 to your computer and use it in GitHub Desktop.
Save lucaspottersky/8775075 to your computer and use it in GitHub Desktop.
Ember testing with ctrl+click using simulate lib.
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