Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-11-03 19:25:28 +0300
committerMike Greiling <mike@pixelcog.com>2017-11-03 19:25:28 +0300
commitae76937bc60e44404bb26cb3f45cbad88194c5c9 (patch)
treefb08294331b34cec60a5dcc3df6919f04cc09c40 /spec
parent43b5bf26c003345d3281762b748f942b53ddce8a (diff)
don't attempt to click on hidden elements
Diffstat (limited to 'spec')
-rw-r--r--spec/features/issues/filtered_search/recent_searches_spec.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/features/issues/filtered_search/recent_searches_spec.rb b/spec/features/issues/filtered_search/recent_searches_spec.rb
index 86f90e51d6b..f355cec3ba9 100644
--- a/spec/features/issues/filtered_search/recent_searches_spec.rb
+++ b/spec/features/issues/filtered_search/recent_searches_spec.rb
@@ -76,7 +76,8 @@ describe 'Recent searches', :js do
set_recent_searches(project_1_local_storage_key, '["foo", "bar"]')
visit project_issues_path(project_1)
- all('.filtered-search-history-dropdown-item', visible: false, count: 2)[0].click
+ find('.filtered-search-history-dropdown-toggle-button').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')
@@ -86,10 +87,11 @@ describe 'Recent searches', :js do
set_recent_searches(project_1_local_storage_key, '["foo"]')
visit project_issues_path(project_1)
- all('.filtered-search-history-dropdown-item', visible: false, count: 1)
+ find('.filtered-search-history-dropdown-toggle-button').click
+ all('.filtered-search-history-dropdown-item', count: 1)
- find('.filtered-search-history-clear-button', visible: false).click
- items_after = all('.filtered-search-history-dropdown-item', visible: false, count: 0)
+ find('.filtered-search-history-clear-button').click
+ items_after = all('.filtered-search-history-dropdown-item', count: 0)
expect(items_after.count).to eq(0)
end