From 03087faa6b679cd82a8a7b5f6491edc414ed91eb Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 15 Oct 2019 15:06:07 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../filtered_search/dropdown_milestone_spec.rb | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'spec/features/issues') diff --git a/spec/features/issues/filtered_search/dropdown_milestone_spec.rb b/spec/features/issues/filtered_search/dropdown_milestone_spec.rb index 9a782950bf6..5272a970a60 100644 --- a/spec/features/issues/filtered_search/dropdown_milestone_spec.rb +++ b/spec/features/issues/filtered_search/dropdown_milestone_spec.rb @@ -39,16 +39,28 @@ describe 'Dropdown milestone', :js do end describe 'behavior' do - it 'opens when the search bar has milestone:' do - filtered_search.set('milestone:') + context 'filters by "milestone:"' do + before do + filtered_search.set('milestone:') + end - expect(page).to have_css(js_dropdown_milestone, visible: true) - end + it 'opens when the search bar has milestone:' do + expect(page).to have_css(js_dropdown_milestone, visible: true) + end - it 'closes when the search bar is unfocused' do - find('body').click + it 'closes when the search bar is unfocused' do + find('body').click - expect(page).to have_css(js_dropdown_milestone, visible: false) + expect(page).to have_css(js_dropdown_milestone, visible: false) + end + + it 'hides loading indicator when loaded' do + expect(find(js_dropdown_milestone)).not_to have_css('.filter-dropdown-loading') + end + + it 'loads all the milestones when opened' do + expect(filter_dropdown).to have_selector('.filter-dropdown .filter-dropdown-item', count: 6) + end end it 'shows loading indicator when opened' do @@ -58,18 +70,6 @@ describe 'Dropdown milestone', :js do expect(page).to have_css('#js-dropdown-milestone .filter-dropdown-loading', visible: true) end end - - it 'hides loading indicator when loaded' do - filtered_search.set('milestone:') - - expect(find(js_dropdown_milestone)).not_to have_css('.filter-dropdown-loading') - end - - it 'loads all the milestones when opened' do - filtered_search.set('milestone:') - - expect(filter_dropdown).to have_selector('.filter-dropdown .filter-dropdown-item', count: 6) - end end describe 'filtering' do -- cgit v1.2.1