diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/features/groups/milestones_sorting_spec.rb | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/features/groups/milestones_sorting_spec.rb')
-rw-r--r-- | spec/features/groups/milestones_sorting_spec.rb | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/spec/features/groups/milestones_sorting_spec.rb b/spec/features/groups/milestones_sorting_spec.rb index d27511be0b0..a06e64fdee0 100644 --- a/spec/features/groups/milestones_sorting_spec.rb +++ b/spec/features/groups/milestones_sorting_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' -describe 'Milestones sorting', :js do +RSpec.describe 'Milestones sorting', :js do let(:group) { create(:group) } let!(:project) { create(:project_empty_repo, group: group) } let!(:other_project) { create(:project_empty_repo, group: group) } @@ -24,21 +24,12 @@ describe 'Milestones sorting', :js do # assert default sorting within '.milestones' do - expect(page.all('ul.content-list > li').first.text).to include('v2.0') - expect(page.all('ul.content-list > li')[1].text).to include('v3.0') - expect(page.all('ul.content-list > li').last.text).to include('v1.0') + expect(page.all('ul.content-list > li strong > a').map(&:text)).to eq(['v2.0', 'v2.0', 'v3.0', 'v1.0', 'v1.0']) end click_button 'Due soon' - sort_options = find('ul.dropdown-menu-sort li').all('a').collect(&:text) - - expect(sort_options[0]).to eq('Due soon') - expect(sort_options[1]).to eq('Due later') - expect(sort_options[2]).to eq('Start soon') - expect(sort_options[3]).to eq('Start later') - expect(sort_options[4]).to eq('Name, ascending') - expect(sort_options[5]).to eq('Name, descending') + expect(find('ul.dropdown-menu-sort li').all('a').map(&:text)).to eq(['Due soon', 'Due later', 'Start soon', 'Start later', 'Name, ascending', 'Name, descending']) click_link 'Due later' @@ -46,9 +37,7 @@ describe 'Milestones sorting', :js do # assert descending sorting within '.milestones' do - expect(page.all('ul.content-list > li').first.text).to include('v1.0') - expect(page.all('ul.content-list > li')[1].text).to include('v3.0') - expect(page.all('ul.content-list > li').last.text).to include('v2.0') + expect(page.all('ul.content-list > li strong > a').map(&:text)).to eq(['v1.0', 'v1.0', 'v3.0', 'v2.0', 'v2.0']) end end end |