Created
March 8, 2014 01:58
-
-
Save coderberry/9424102 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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