Skip to content

Instantly share code, notes, and snippets.

@mars
Last active December 20, 2015 06:29
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • 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();
}
);
@RobbieTheWagner
Copy link

So, how do we use fillIn to test the select view? I can't get it to work.

@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