summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-01 07:18:15 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-01 07:18:15 +0000
commit8fb76a8308292d991a32ea76e50fb5ecfa3284b2 (patch)
treee874cb67947340fea027e94e7f5cae9e57d8d992 /features
parentbcfcd243a635a1ce655440562897c3ef9603eda9 (diff)
parent3e52517da1c506885c06c13ff59ff5863bcb68ea (diff)
downloadgitlab-ce-8fb76a8308292d991a32ea76e50fb5ecfa3284b2.tar.gz
Merge branch 'group_milestones' into 'master'
Group milestones
Diffstat (limited to 'features')
-rw-r--r--features/group.feature19
-rw-r--r--features/steps/group/group.rb94
2 files changed, 113 insertions, 0 deletions
diff --git a/features/group.feature b/features/group.feature
index 71c28c07a3c..0c70e5b915c 100644
--- a/features/group.feature
+++ b/features/group.feature
@@ -120,3 +120,22 @@ Feature: Groups
When I search for 'Mary' member
Then I should see user "Mary Jane" in team list
Then I should not see user "John Doe" in team list
+
+
+ Scenario: I should see group "Owned" milestone index page with no milestones
+ When I visit group "Owned" page
+ And I click on group milestones
+ Then I should see group milestones index page has no milestones
+
+ Scenario: I should see group "Owned" milestone index page with milestones
+ Given Group has projects with milestones
+ When I visit group "Owned" page
+ And I click on group milestones
+ Then I should see group milestones index page with milestones
+
+ Scenario: I should see group "Owned" milestone show page
+ Given Group has projects with milestones
+ When I visit group "Owned" page
+ And I click on group milestones
+ And I click on one group milestone
+ Then I should see group milestone with all issues and MRs assigned to that milestone
diff --git a/features/steps/group/group.rb b/features/steps/group/group.rb
index f321428592f..85276f04dd2 100644
--- a/features/steps/group/group.rb
+++ b/features/steps/group/group.rb
@@ -164,6 +164,36 @@ class Groups < Spinach::FeatureSteps
end
end
+ step 'I click on group milestones' do
+ click_link 'Milestones'
+ end
+
+ step 'I should see group milestones index page has no milestones' do
+ page.should have_content('No milestones to show')
+ end
+
+ step 'Group has projects with milestones' do
+ group_milestone
+ end
+
+ step 'I should see group milestones index page with milestones' do
+ page.should have_content('Version 7.2')
+ page.should have_content('GL-113')
+ page.should have_link('2 Issues', href: group_milestone_path("owned", "version-7-2", title: "Version 7.2"))
+ page.should have_link('3 Merge Requests', href: group_milestone_path("owned", "gl-113", title: "GL-113"))
+ end
+
+ step 'I click on one group milestone' do
+ click_link 'GL-113'
+ end
+
+ step 'I should see group milestone with all issues and MRs assigned to that milestone' do
+ page.should have_content('Milestone GL-113')
+ page.should have_content('Progress: 0 closed – 4 open')
+ page.should have_link(@issue1.title, href: project_issue_path(@project1, @issue1))
+ page.should have_link(@mr3.title, href: project_merge_request_path(@project3, @mr3))
+ end
+
protected
def assigned_to_me key
@@ -173,4 +203,68 @@ class Groups < Spinach::FeatureSteps
def project
Group.find_by(name: "Owned").projects.first
end
+
+ def group_milestone
+ group = Group.find_by(name: "Owned")
+
+ @project1 = create :project,
+ group: group
+ project2 = create :project,
+ path: 'gitlab-ci',
+ group: group
+ @project3 = create :project,
+ path: 'cookbook-gitlab',
+ group: group
+ milestone1_project1 = create :milestone,
+ title: "Version 7.2",
+ project: @project1
+ milestone1_project2 = create :milestone,
+ title: "Version 7.2",
+ project: project2
+ milestone1_project3 = create :milestone,
+ title: "Version 7.2",
+ project: @project3
+ milestone2_project1 = create :milestone,
+ title: "GL-113",
+ project: @project1
+ milestone2_project2 = create :milestone,
+ title: "GL-113",
+ project: project2
+ milestone2_project3 = create :milestone,
+ title: "GL-113",
+ project: @project3
+ @issue1 = create :issue,
+ project: @project1,
+ assignee: current_user,
+ author: current_user,
+ milestone: milestone2_project1
+ issue2 = create :issue,
+ project: project2,
+ assignee: current_user,
+ author: current_user,
+ milestone: milestone1_project2
+ issue3 = create :issue,
+ project: @project3,
+ assignee: current_user,
+ author: current_user,
+ milestone: milestone1_project1
+ mr1 = create :merge_request,
+ source_project: @project1,
+ target_project: @project1,
+ assignee: current_user,
+ author: current_user,
+ milestone: milestone2_project1
+ mr2 = create :merge_request,
+ source_project: project2,
+ target_project: project2,
+ assignee: current_user,
+ author: current_user,
+ milestone: milestone2_project2
+ @mr3 = create :merge_request,
+ source_project: @project3,
+ target_project: @project3,
+ assignee: current_user,
+ author: current_user,
+ milestone: milestone2_project3
+ end
end