Skip to content

Instantly share code, notes, and snippets.

View lucaspottersky's full-sized avatar
🎯
Focusing

Lucas Pottersky lucaspottersky

🎯
Focusing
View GitHub Profile
@lucaspottersky
lucaspottersky / test_with_simulate_ctrl_click.js
Last active August 29, 2015 13:55
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 });
})