diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-11-01 14:33:16 -0500 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-11-01 14:33:16 -0500 |
commit | 53281e09e486acdca8c9ca9adba3bd4d4d50514a (patch) | |
tree | 4d78ee9ab38c7d7e86d38075c77033cc45e141e7 /spec | |
parent | 3f3875dbf93b5e6b02d3f4320145f5a5bd8b42dc (diff) | |
download | gitlab-ce-53281e09e486acdca8c9ca9adba3bd4d4d50514a.tar.gz |
add slow_requests! to filtered search tests which expect to see a loading spinner
Diffstat (limited to 'spec')
5 files changed, 10 insertions, 0 deletions
diff --git a/spec/features/issues/filtered_search/dropdown_assignee_spec.rb b/spec/features/issues/filtered_search/dropdown_assignee_spec.rb index 550a778bda1..9fa26327d7e 100644 --- a/spec/features/issues/filtered_search/dropdown_assignee_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_assignee_spec.rb @@ -43,9 +43,11 @@ describe 'Dropdown assignee', :js do end it 'should show loading indicator when opened' do + Gitlab::Testing::RequestBlockerMiddleware.slow_requests! filtered_search.set('assignee:') expect(page).to have_css('#js-dropdown-assignee .filter-dropdown-loading', visible: true) + Gitlab::Testing::RequestBlockerMiddleware.allow_requests! end it 'should hide loading indicator when loaded' do diff --git a/spec/features/issues/filtered_search/dropdown_author_spec.rb b/spec/features/issues/filtered_search/dropdown_author_spec.rb index 5e20fb48768..305b6830faa 100644 --- a/spec/features/issues/filtered_search/dropdown_author_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_author_spec.rb @@ -51,9 +51,11 @@ describe 'Dropdown author', :js do end it 'should show loading indicator when opened' do + Gitlab::Testing::RequestBlockerMiddleware.slow_requests! filtered_search.set('author:') expect(page).to have_css('#js-dropdown-author .filter-dropdown-loading', visible: true) + Gitlab::Testing::RequestBlockerMiddleware.allow_requests! end it 'should hide loading indicator when loaded' do diff --git a/spec/features/issues/filtered_search/dropdown_emoji_spec.rb b/spec/features/issues/filtered_search/dropdown_emoji_spec.rb index 3012c77f2b9..f502219484f 100644 --- a/spec/features/issues/filtered_search/dropdown_emoji_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_emoji_spec.rb @@ -70,9 +70,11 @@ describe 'Dropdown emoji', :js do end it 'should show loading indicator when opened' do + Gitlab::Testing::RequestBlockerMiddleware.slow_requests! filtered_search.set('my-reaction:') expect(page).to have_css('#js-dropdown-my-reaction .filter-dropdown-loading', visible: true) + Gitlab::Testing::RequestBlockerMiddleware.allow_requests! end it 'should hide loading indicator when loaded' do diff --git a/spec/features/issues/filtered_search/dropdown_label_spec.rb b/spec/features/issues/filtered_search/dropdown_label_spec.rb index 40a59f834ba..223f6e9de16 100644 --- a/spec/features/issues/filtered_search/dropdown_label_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_label_spec.rb @@ -66,10 +66,12 @@ describe 'Dropdown label', :js do end it 'shows loading indicator when opened and hides it when loaded' do + Gitlab::Testing::RequestBlockerMiddleware.slow_requests! filtered_search.set('label:') expect(page).to have_css("#{js_dropdown_label} .filter-dropdown-loading", visible: true) expect(find(js_dropdown_label)).not_to have_css('.filter-dropdown-loading') + Gitlab::Testing::RequestBlockerMiddleware.allow_requests! end it 'loads all the labels when opened' do diff --git a/spec/features/issues/filtered_search/dropdown_milestone_spec.rb b/spec/features/issues/filtered_search/dropdown_milestone_spec.rb index 8536686e611..4a531b8d568 100644 --- a/spec/features/issues/filtered_search/dropdown_milestone_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_milestone_spec.rb @@ -50,9 +50,11 @@ describe 'Dropdown milestone', :js do end it 'should show loading indicator when opened' do + Gitlab::Testing::RequestBlockerMiddleware.slow_requests! filtered_search.set('milestone:') expect(page).to have_css('#js-dropdown-milestone .filter-dropdown-loading', visible: true) + Gitlab::Testing::RequestBlockerMiddleware.allow_requests! end it 'should hide loading indicator when loaded' do |