Skip to content

Instantly share code, notes, and snippets.

@vladimir-e
Forked from mars/gist:6086194
Created August 30, 2014 18:47
Show Gist options
  • Save vladimir-e/e940825d2f1e550e42cb to your computer and use it in GitHub Desktop.
Save vladimir-e/e940825d2f1e550e42cb to your computer and use it in GitHub Desktop.
Ember.Test.registerHelper('selectFrom',
function(app, selector, value, description) {
// choose an option
find(selector).val(value);
// trigger the change
find(selector).change();
// assert the selected option
equal(find(selector+" option:selected").val(), value, description||"makes the selection");
// promise
return wait();
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment