Skip to content

Instantly share code, notes, and snippets.

@toranb
Created August 26, 2015 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toranb/8c31665ba0222703b203 to your computer and use it in GitHub Desktop.
Save toranb/8c31665ba0222703b203 to your computer and use it in GitHub Desktop.
a simple ember example showing how to select multiple items in a "multi select" (integration testing)
test('multi select in a ember integration test', function(assert) {
//setup your model and other component state ...
this.render(hbs`{{my-multi-select model=model options=options}}`);
this.$('.some-multi-select > option[value="' + MY_NEW_ID + '"]').prop('selected',true).trigger('change');
assert.equal(model.get('related_things').get('length'), new_count_with_added_item);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment