Test helpers
Ember Basic Dropdown bundles some handy test helpers (clickDropdown
and
tapDropdown
) that make it easier to simulate user interaction in
acceptance tests.
You can just have to import them at the top of your tests and call them
preceded by
await
.
clickTrigger(scope = null, eventOptions)
Simulates a click to open or close the dropdown. As all integration test
helpers is already runloop aware, so you don't need to wrap it in
Ember.run
.
In case there is more than one dropdown rendered at the same time you can pass a string with the scope to trigger it over the desired one.
tapTrigger(scope = null, eventOptions)
Identical to
clickTrigger
but simulates a tap instead.