Commit 53281e09 authored by Mike Greiling's avatar Mike Greiling

add slow_requests! to filtered search tests which expect to see a loading spinner

parent 3f3875db
...@@ -43,9 +43,11 @@ describe 'Dropdown assignee', :js do ...@@ -43,9 +43,11 @@ describe 'Dropdown assignee', :js do
end end
it 'should show loading indicator when opened' do it 'should show loading indicator when opened' do
Gitlab::Testing::RequestBlockerMiddleware.slow_requests!
filtered_search.set('assignee:') filtered_search.set('assignee:')
expect(page).to have_css('#js-dropdown-assignee .filter-dropdown-loading', visible: true) expect(page).to have_css('#js-dropdown-assignee .filter-dropdown-loading', visible: true)
Gitlab::Testing::RequestBlockerMiddleware.allow_requests!
end end
it 'should hide loading indicator when loaded' do it 'should hide loading indicator when loaded' do
......
...@@ -51,9 +51,11 @@ describe 'Dropdown author', :js do ...@@ -51,9 +51,11 @@ describe 'Dropdown author', :js do
end end
it 'should show loading indicator when opened' do it 'should show loading indicator when opened' do
Gitlab::Testing::RequestBlockerMiddleware.slow_requests!
filtered_search.set('author:') filtered_search.set('author:')
expect(page).to have_css('#js-dropdown-author .filter-dropdown-loading', visible: true) expect(page).to have_css('#js-dropdown-author .filter-dropdown-loading', visible: true)
Gitlab::Testing::RequestBlockerMiddleware.allow_requests!
end end
it 'should hide loading indicator when loaded' do it 'should hide loading indicator when loaded' do
......
...@@ -70,9 +70,11 @@ describe 'Dropdown emoji', :js do ...@@ -70,9 +70,11 @@ describe 'Dropdown emoji', :js do
end end
it 'should show loading indicator when opened' do it 'should show loading indicator when opened' do
Gitlab::Testing::RequestBlockerMiddleware.slow_requests!
filtered_search.set('my-reaction:') filtered_search.set('my-reaction:')
expect(page).to have_css('#js-dropdown-my-reaction .filter-dropdown-loading', visible: true) expect(page).to have_css('#js-dropdown-my-reaction .filter-dropdown-loading', visible: true)
Gitlab::Testing::RequestBlockerMiddleware.allow_requests!
end end
it 'should hide loading indicator when loaded' do it 'should hide loading indicator when loaded' do
......
...@@ -66,10 +66,12 @@ describe 'Dropdown label', :js do ...@@ -66,10 +66,12 @@ describe 'Dropdown label', :js do
end end
it 'shows loading indicator when opened and hides it when loaded' do it 'shows loading indicator when opened and hides it when loaded' do
Gitlab::Testing::RequestBlockerMiddleware.slow_requests!
filtered_search.set('label:') filtered_search.set('label:')
expect(page).to have_css("#{js_dropdown_label} .filter-dropdown-loading", visible: true) 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') expect(find(js_dropdown_label)).not_to have_css('.filter-dropdown-loading')
Gitlab::Testing::RequestBlockerMiddleware.allow_requests!
end end
it 'loads all the labels when opened' do it 'loads all the labels when opened' do
......
...@@ -50,9 +50,11 @@ describe 'Dropdown milestone', :js do ...@@ -50,9 +50,11 @@ describe 'Dropdown milestone', :js do
end end
it 'should show loading indicator when opened' do it 'should show loading indicator when opened' do
Gitlab::Testing::RequestBlockerMiddleware.slow_requests!
filtered_search.set('milestone:') filtered_search.set('milestone:')
expect(page).to have_css('#js-dropdown-milestone .filter-dropdown-loading', visible: true) expect(page).to have_css('#js-dropdown-milestone .filter-dropdown-loading', visible: true)
Gitlab::Testing::RequestBlockerMiddleware.allow_requests!
end end
it 'should hide loading indicator when loaded' do it 'should hide loading indicator when loaded' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment