emberjs/ember.js — pull request #2938 by dagda1 (2013-07-02 04:58:13+00:00)
Title: keyEvent integration test helper to simulate keydown, keypress etc.

keyEvent integration test helper in a similar vein to click, fillIn etc. to simulate keydown, keypress etc.

Example usage:

```
visit('/posts').click('a:first', '#comments-link')
.fillIn('.ember-text-field', "hello")
.then(function() {
equal(currentRoute, 'comments', "Successfully visited posts route");
equal(Ember.$('.ember-text-field').val(), 'hello', "Fillin successfully works");
find('.ember-text-field').one('keypress', function(e){
equal(e.keyCode, 13, "keyevent chained with correct keyCode.");
});
})
.keyEvent('.ember-text-field', 'keypress', 13)
.visit('/posts')
.then(function() {
equal(currentRoute, 'posts', "Thens can also be chained to helpers");
});
```