Created
May 24, 2016 13:36
-
-
Save b1nary/f4f75415ccfd59d3fe62326077d2291c to your computer and use it in GitHub Desktop.
Capybara + Select2 v4 + Ajax search
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
module Select2Helper | |
def select2 value, **options | |
first("#select2-#{options[:from]}-container").click | |
find('.select2-search__field').set('National') | |
find(".select2-results__option", text: value).click | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment