summaryrefslogtreecommitdiff
path: root/spec/features/search/user_uses_header_search_field_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/search/user_uses_header_search_field_spec.rb')
-rw-r--r--spec/features/search/user_uses_header_search_field_spec.rb21
1 files changed, 20 insertions, 1 deletions
diff --git a/spec/features/search/user_uses_header_search_field_spec.rb b/spec/features/search/user_uses_header_search_field_spec.rb
index 7ddd5c12cdf..5006631cc14 100644
--- a/spec/features/search/user_uses_header_search_field_spec.rb
+++ b/spec/features/search/user_uses_header_search_field_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe 'User uses header search field', :js do
@@ -20,7 +22,7 @@ describe 'User uses header search field', :js do
fill_in('search', with: 'gitlab')
find('#search').native.send_keys(:enter)
- page.within('.breadcrumbs-sub-title') do
+ page.within('.page-title') do
expect(page).to have_content('Search')
end
end
@@ -94,6 +96,23 @@ describe 'User uses header search field', :js do
let(:url) { root_path }
let(:scope_name) { 'All GitLab' }
end
+
+ context 'when searching through the search field' do
+ before do
+ create(:issue, project: project, title: 'project issue')
+
+ fill_in('search', with: 'project')
+ find('#search').send_keys(:enter)
+ end
+
+ it 'displays result counts for all categories' do
+ expect(page).to have_content('Projects 1')
+ expect(page).to have_content('Issues 1')
+ expect(page).to have_content('Merge requests 0')
+ expect(page).to have_content('Milestones 0')
+ expect(page).to have_content('Users 0')
+ end
+ end
end
context 'when user is in a project scope' do