Created
July 16, 2015 03:32
-
-
Save alexdiliberto/f3b18c2f4e923f6e8292 to your computer and use it in GitHub Desktop.
Ember QUnit Test Helper: selectById()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function selectById(selectId, optionLabel) { | |
| return function() { | |
| const option = findWithAssert(`#${selectId} option:contains('${optionLabel}')`); | |
| fillIn(`#${selectId}`, option.attr('value')); | |
| return find(selectId).focusout(); | |
| }; | |
| } | |
| andThen(selectById('#selector', 'some option')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment