Created
February 13, 2013 21:22
-
-
Save kumavis/4948438 to your computer and use it in GitHub Desktop.
This file contains 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
Helpers.Velcro = | |
getSelection: ($elem) -> | |
$elem.find('.selectedOption').text().trim() | |
hasSelection: ($elem) -> | |
not Helpers.Velcro.getSelection($elem).contains("Select") | |
selectRandomOption: ($elem, continueTesting) -> | |
$elem.find('.velcro-dropdown').click() | |
Helpers.afterDomUpdate -> | |
options = $elem.find('.results .option') | |
targetOption = Helpers.randomSelection( options ) | |
targetOption.click() | |
Helpers.afterDomUpdate -> | |
# continue testing http://bit.ly/X4kWUv | |
continueTesting( targetOption ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment