summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Slaughter <pslaughter@gitlab.com>2019-05-01 16:13:08 -0500
committerPaul Slaughter <pslaughter@gitlab.com>2019-05-01 23:14:36 -0500
commitecc2527032f4e8d6caa66d51fcea22437dd88ab8 (patch)
tree277974f9d6d25e71161ffa291a554f71ed80ad42
parent43648e5ed9c23e5e34bd67255aac329b32b3e925 (diff)
downloadgitlab-ce-ce-11194-fix-approvals-groups-all-available.tar.gz
Add close_select2 method to select2_helperce-11194-fix-approvals-groups-all-available
**Why?** This is needed to create a feature test for: https://gitlab.com/gitlab-org/gitlab-ee/issues/11194
-rw-r--r--spec/support/helpers/select2_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/helpers/select2_helper.rb b/spec/support/helpers/select2_helper.rb
index f4f0415985c..87672c8896d 100644
--- a/spec/support/helpers/select2_helper.rb
+++ b/spec/support/helpers/select2_helper.rb
@@ -35,6 +35,10 @@ module Select2Helper
execute_script("$('#{selector}').select2('open');")
end
+ def close_select2(selector)
+ execute_script("$('#{selector}').select2('close');")
+ end
+
def scroll_select2_to_bottom(selector)
evaluate_script "$('#{selector}').scrollTop($('#{selector}')[0].scrollHeight); $('#{selector}');"
end