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

keyEvent integration test helper to simulate keydown, keypress etc. #2938

Merged
merged 1 commit into from Jul 15, 2013

Conversation

Projects
None yet
3 participants
@dagda1
Copy link
Contributor

dagda1 commented Jul 2, 2013

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");
  });
@fivetanley

This comment has been minimized.

Copy link
Member

fivetanley commented Jul 9, 2013

@dagda1 Can you rebase on top of latest master? Seems like the phantomjs failure is travis's fault.

@dagda1

This comment has been minimized.

Copy link
Contributor

dagda1 commented Jul 9, 2013

I've rebased and the tests are still timing out for some reason. Needless to say they all pass locally.

@dagda1

This comment has been minimized.

Copy link
Contributor

dagda1 commented Jul 12, 2013

Is there anything else I can do with regard to why this is failing on travis?

@dagda1

This comment has been minimized.

Copy link
Contributor

dagda1 commented Jul 12, 2013

Actually it is passing now. Any feedback welcome.

wycats added a commit that referenced this pull request Jul 15, 2013

Merge pull request #2938 from dagda1/keyDown
keyEvent integration test helper to simulate keydown, keypress etc.

@wycats wycats merged commit 7304e70 into emberjs:master Jul 15, 2013

1 check passed

default The Travis CI build passed
Details

@dagda1 dagda1 deleted the dagda1:keyDown branch Jul 15, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment