From a4d71cba7ef80e6f3c10f148dd1edfbef7f82893 Mon Sep 17 00:00:00 2001 From: George Andrinopoulos Date: Tue, 7 Nov 2017 20:57:30 +0200 Subject: Add group milestone to feature spec and minor changes --- spec/features/groups/milestones_sorting_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec/features/groups') diff --git a/spec/features/groups/milestones_sorting_spec.rb b/spec/features/groups/milestones_sorting_spec.rb index 3bd59587535..a0fe40cf1d3 100644 --- a/spec/features/groups/milestones_sorting_spec.rb +++ b/spec/features/groups/milestones_sorting_spec.rb @@ -8,6 +8,7 @@ feature 'Milestones sorting', :js do let!(:other_project_milestone1) { create(:milestone, project: other_project, title: 'v1.0', due_date: 10.days.from_now) } let!(:project_milestone2) { create(:milestone, project: project, title: 'v2.0', due_date: 5.days.from_now) } let!(:other_project_milestone2) { create(:milestone, project: other_project, title: 'v2.0', due_date: 5.days.from_now) } + let!(:group_milestone) { create(:milestone, group: group, title: 'v3.0', due_date: 7.days.from_now) } let(:user) { create(:group_member, :master, user: create(:user), group: group ).user } before do @@ -22,6 +23,7 @@ feature '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') end @@ -33,6 +35,8 @@ feature 'Milestones sorting', :js do 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') click_link 'Due later' @@ -40,6 +44,7 @@ feature 'Milestones sorting', :js do 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') end end -- cgit v1.2.1