diff options
author | Markus Koller <mkoller@gitlab.com> | 2019-08-30 09:49:14 +0000 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2019-08-30 09:49:14 +0000 |
commit | 1bccd36f04f1e1c4efe9155ea9037910c42a3749 (patch) | |
tree | 5fa93f57ef35c07ee4cd9c15480404d15f0c47b3 /spec/features/search/user_searches_for_merge_requests_spec.rb | |
parent | b76bc2762a245c61089fae486e61c9fd83d45f95 (diff) | |
download | gitlab-ce-1bccd36f04f1e1c4efe9155ea9037910c42a3749.tar.gz |
Improve search result labels
- Use "results" instead of "blobs", "wiki blobs", "snippet blobs"
- Use "comments" instead of "notes"
- Use correct pluralization
- Don't add "1 - 10 of" if there's only one page
Diffstat (limited to 'spec/features/search/user_searches_for_merge_requests_spec.rb')
-rw-r--r-- | spec/features/search/user_searches_for_merge_requests_spec.rb | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/spec/features/search/user_searches_for_merge_requests_spec.rb b/spec/features/search/user_searches_for_merge_requests_spec.rb index d005b87cdfe..0139ac26816 100644 --- a/spec/features/search/user_searches_for_merge_requests_spec.rb +++ b/spec/features/search/user_searches_for_merge_requests_spec.rb @@ -20,13 +20,11 @@ describe 'User searches for merge requests', :js do it 'finds a merge request' do fill_in('dashboard_search', with: merge_request1.title) find('.btn-search').click - - page.within('.search-filter') do - click_link('Merge requests') - end + select_search_scope('Merge requests') page.within('.results') do - expect(find(:css, '.search-results')).to have_link(merge_request1.title).and have_no_link(merge_request2.title) + expect(page).to have_link(merge_request1.title) + expect(page).not_to have_link(merge_request2.title) end end @@ -40,13 +38,11 @@ describe 'User searches for merge requests', :js do fill_in('dashboard_search', with: merge_request1.title) find('.btn-search').click - - page.within('.search-filter') do - click_link('Merge requests') - end + select_search_scope('Merge requests') page.within('.results') do - expect(find(:css, '.search-results')).to have_link(merge_request1.title).and have_no_link(merge_request2.title) + expect(page).to have_link(merge_request1.title) + expect(page).not_to have_link(merge_request2.title) end end end |