Commit 4f51ab83 authored by Mike Greiling's avatar Mike Greiling

don't attempt to click on hidden elements

parent 6faf45e8
......@@ -81,7 +81,7 @@ describe 'Recent searches', :js do
visit project_issues_path(project_1)
find('.filtered-search-history-dropdown-toggle-button').click
all('.filtered-search-history-dropdown-item')[0].click
all('.filtered-search-history-dropdown-item', count: 2)[0].click
wait_for_filtered_search('foo')
expect(find('.filtered-search').value.strip).to eq('foo')
......@@ -92,13 +92,10 @@ describe 'Recent searches', :js do
visit project_issues_path(project_1)
find('.filtered-search-history-dropdown-toggle-button').click
items_before = all('.filtered-search-history-dropdown-item')
expect(items_before.count).to eq(1)
all('.filtered-search-history-dropdown-item', count: 1)
find('.filtered-search-history-clear-button').click
find('.filtered-search-history-dropdown-toggle-button').click
items_after = all('.filtered-search-history-dropdown-item')
items_after = all('.filtered-search-history-dropdown-item', count: 0)
expect(items_after.count).to eq(0)
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