diff options
author | charlieablett <cablett@gitlab.com> | 2019-04-08 16:52:40 +1200 |
---|---|---|
committer | charlieablett <cablett@gitlab.com> | 2019-04-08 16:52:40 +1200 |
commit | e82ed3f46bcc5442668e64b7080f7bb4425956c0 (patch) | |
tree | 986e1503ac99821158db4eaa6e1e1a015818b87a /spec | |
parent | 6b8f6075b785ae91d3319ab19361f04ab2ade9b9 (diff) | |
download | gitlab-ce-e82ed3f46bcc5442668e64b7080f7bb4425956c0.tar.gz |
Abstract out method from spec to support
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/boards/sidebar_spec.rb | 1 | ||||
-rw-r--r-- | spec/support/helpers/filtered_search_helpers.rb | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/spec/features/boards/sidebar_spec.rb b/spec/features/boards/sidebar_spec.rb index dfdb8d589eb..d036699f226 100644 --- a/spec/features/boards/sidebar_spec.rb +++ b/spec/features/boards/sidebar_spec.rb @@ -129,6 +129,7 @@ describe 'Issue Boards', :js do click_link 'Unassigned' end + close_dropdown_menu_if_visible wait_for_requests expect(page).to have_content('No assignee') 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 |