Skip to content

Instantly share code, notes, and snippets.

@mars
Last active December 20, 2015 06:29
Show Gist options
  • Save mars/6086194 to your computer and use it in GitHub Desktop.
Save mars/6086194 to your computer and use it in GitHub Desktop.
DEPRECATED see comments: ember-testing: select an option (helper)
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();
}
);
@keithbro
Copy link

@rwwagner90 I just tried it on Ember 1.11.1 and it works fine

fillIn(selector, value);

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