summaryrefslogtreecommitdiff
path: root/spec/support/helpers/filtered_search_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/helpers/filtered_search_helpers.rb')
-rw-r--r--spec/support/helpers/filtered_search_helpers.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/support/helpers/filtered_search_helpers.rb b/spec/support/helpers/filtered_search_helpers.rb
index 6569feec39b..03057a102c5 100644
--- a/spec/support/helpers/filtered_search_helpers.rb
+++ b/spec/support/helpers/filtered_search_helpers.rb
@@ -149,4 +149,10 @@ module FilteredSearchHelpers
loop until find('.filtered-search').value.strip == text
end
end
+
+ def close_dropdown_menu_if_visible
+ find('.dropdown-menu-toggle', visible: :all).tap do |toggle|
+ toggle.click if toggle.visible?
+ end
+ end
end