Abstract out method from spec to support

This commit is contained in:
charlieablett 2019-04-08 16:52:40 +12:00
parent 6b8f6075b7
commit e82ed3f46b
2 changed files with 7 additions and 0 deletions

View File

@ -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')

View File

@ -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