Simulate selection selection in ember integration test
How do you invoke a selection <option>
on an item select
in an integration test? select2 is simple enough: Simulate ember-select2 selection in ember integration test
+5
source to share
2 answers
The basic example for ember 1.12 or 1.13+ will use the fillIn helper. I just haven't used it with jquery like the one you mentioned above. Give it a try and submit a report :)
visit("/foobar");
var firstOption = find(".my-select option:eq(0)");
fillIn(".my-select", firstOption.val());
andThen(function() {
assert.equal(find(".my-select").val(), 78); //assuming 78 is the first options value ...
});
+6
source to share