Skip to content

Instantly share code, notes, and snippets.

@coderberry
Created March 8, 2014 01:58
Show Gist options
  • Save coderberry/9424102 to your computer and use it in GitHub Desktop.
Save coderberry/9424102 to your computer and use it in GitHub Desktop.
Ember.Test.registerAsyncHelper('submitForm',
function(app, selector, context) {
var $el = findWithAssert(selector, context);
Ember.run(function() {
$el.submit();
});
}
);
// Example Usage
visit('/youtube/search');
fillIn('input#search', 'education');
submitForm('form.form-search');
andThen(function() {
// ...
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment