BigW Consortium Gitlab

Commit ebd5c309 by Stan Hu

Add missing Capybara select2 helper

parent 7b5722c8
...@@ -11,6 +11,11 @@ ...@@ -11,6 +11,11 @@
# #
module Select2Helper module Select2Helper
def capybara_select2(value)
# Taken from https://github.com/goodwill/capybara-select2/blob/master/gem/lib/capybara-select2.rb#L45
find('.select2-drop li.select2-result-selectable', text: value).click
end
def select2(value, options = {}) def select2(value, options = {})
raise ArgumentError, 'options must be a Hash' unless options.is_a?(Hash) raise ArgumentError, 'options must be a Hash' unless options.is_a?(Hash)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment