diff options
Diffstat (limited to 'spec/features/global_search_spec.rb')
-rw-r--r-- | spec/features/global_search_spec.rb | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/spec/features/global_search_spec.rb b/spec/features/global_search_spec.rb index f2ab5373d3d..a7ccc6f7d7b 100644 --- a/spec/features/global_search_spec.rb +++ b/spec/features/global_search_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'Global search' do @@ -7,6 +9,15 @@ describe 'Global search' do before do project.add_maintainer(user) sign_in(user) + + visit dashboard_projects_path + end + + it 'increases usage ping searches counter' do + expect(Gitlab::UsageDataCounters::SearchCounter).to receive(:increment_navbar_searches_count) + + fill_in "search", with: "foobar" + click_button "Go" end describe 'I search through the issues and I see pagination' do @@ -16,8 +27,6 @@ describe 'Global search' do end it "has a pagination" do - visit dashboard_projects_path - fill_in "search", with: "initial" click_button "Go" @@ -27,8 +36,6 @@ describe 'Global search' do end it 'closes the dropdown on blur', :js do - visit dashboard_projects_path - fill_in 'search', with: "a" dropdown = find('.js-dashboard-search-options') |