summaryrefslogtreecommitdiff
path: root/spec/features/milestones
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-03 18:06:49 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-03 18:06:49 +0000
commitab7cf450ba19cf80b9534f25dc707b33845e3014 (patch)
treebbfa6aba83c48aea68d79c4179ce576b6eec326d /spec/features/milestones
parent4204cf308596e0e26f578a6e2da88f49c0f4aad9 (diff)
downloadgitlab-ce-ab7cf450ba19cf80b9534f25dc707b33845e3014.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features/milestones')
-rw-r--r--spec/features/milestones/user_views_milestones_spec.rb31
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/features/milestones/user_views_milestones_spec.rb b/spec/features/milestones/user_views_milestones_spec.rb
index 09378cab5e3..c91fe95aa77 100644
--- a/spec/features/milestones/user_views_milestones_spec.rb
+++ b/spec/features/milestones/user_views_milestones_spec.rb
@@ -18,6 +18,7 @@ describe "User views milestones" do
expect(page).to have_content(milestone.title)
.and have_content(milestone.expires_at)
.and have_content("Issues")
+ .and have_content("Merge Requests")
end
context "with issues" do
@@ -32,6 +33,7 @@ describe "User views milestones" do
.and have_selector("#tab-issues li.issuable-row", count: 2)
.and have_content(issue.title)
.and have_content(closed_issue.title)
+ .and have_selector("#tab-merge-requests")
end
end
@@ -62,3 +64,32 @@ describe "User views milestones" do
end
end
end
+
+describe "User views milestones with no MR" do
+ set(:user) { create(:user) }
+ set(:project) { create(:project, :merge_requests_disabled) }
+ set(:milestone) { create(:milestone, project: project) }
+
+ before do
+ project.add_developer(user)
+ sign_in(user)
+
+ visit(project_milestones_path(project))
+ end
+
+ it "shows milestone" do
+ expect(page).to have_content(milestone.title)
+ .and have_content(milestone.expires_at)
+ .and have_content("Issues")
+ .and have_no_content("Merge Requests")
+ end
+
+ it "opens milestone" do
+ click_link(milestone.title)
+
+ expect(current_path).to eq(project_milestone_path(project, milestone))
+ expect(page).to have_content(milestone.title)
+ .and have_selector("#tab-issues")
+ .and have_no_selector("#tab-merge-requests")
+ end
+end