Commit 92fd92a7 authored by Paul Slaughter's avatar Paul Slaughter

Add close_select2 method to select2_helper

**Why?**
This is needed to create a feature test for:
https://gitlab.com/gitlab-org/gitlab-ee/issues/11194
parent 280ef2bf
...@@ -35,6 +35,10 @@ module Select2Helper ...@@ -35,6 +35,10 @@ module Select2Helper
execute_script("$('#{selector}').select2('open');") execute_script("$('#{selector}').select2('open');")
end end
def close_select2(selector)
execute_script("$('#{selector}').select2('close');")
end
def scroll_select2_to_bottom(selector) def scroll_select2_to_bottom(selector)
evaluate_script "$('#{selector}').scrollTop($('#{selector}')[0].scrollHeight); $('#{selector}');" evaluate_script "$('#{selector}').scrollTop($('#{selector}')[0].scrollHeight); $('#{selector}');"
end end
......
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