summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKushal Pandya <kushal@gitlab.com>2018-08-26 11:04:58 +0200
committerKushal Pandya <kushal@gitlab.com>2018-08-26 11:23:17 +0200
commit9d7da791573fd87be4869586a95354eb01ad7806 (patch)
tree484f8d9e5c92f03040cbea5b5cc22a776af2dfb1
parent789fcae35eb54296959818e962a8dd3541eb00cd (diff)
downloadgitlab-ce-9d7da791573fd87be4869586a95354eb01ad7806.tar.gz
Add group name badge under group milestone
-rw-r--r--app/views/shared/milestones/_milestone.html.haml3
-rw-r--r--spec/features/dashboard/milestones_spec.rb3
2 files changed, 6 insertions, 0 deletions
diff --git a/app/views/shared/milestones/_milestone.html.haml b/app/views/shared/milestones/_milestone.html.haml
index c559945a9c9..60f3f606ff9 100644
--- a/app/views/shared/milestones/_milestone.html.haml
+++ b/app/views/shared/milestones/_milestone.html.haml
@@ -16,6 +16,9 @@
= milestone_date_range(milestone)
%div
= render('shared/milestone_expired', milestone: milestone)
+ - if milestone.group_milestone?
+ .label-badge.label-badge-blue.d-inline-block
+ = milestone.group.full_name
- if milestone.legacy_group_milestone?
.projects
- milestone.milestones.each do |milestone|
diff --git a/spec/features/dashboard/milestones_spec.rb b/spec/features/dashboard/milestones_spec.rb
index 0db69432702..d9d67788b38 100644
--- a/spec/features/dashboard/milestones_spec.rb
+++ b/spec/features/dashboard/milestones_spec.rb
@@ -13,8 +13,10 @@ describe 'Dashboard > Milestones' do
describe 'as logged-in user' do
let(:user) { create(:user) }
+ let(:group) { create(:group) }
let(:project) { create(:project, namespace: user.namespace) }
let!(:milestone) { create(:milestone, project: project) }
+ let!(:milestone2) { create(:milestone, group: group) }
before do
project.add_maintainer(user)
sign_in(user)
@@ -24,6 +26,7 @@ describe 'Dashboard > Milestones' do
it 'sees milestones' do
expect(current_path).to eq dashboard_milestones_path
expect(page).to have_content(milestone.title)
+ expect(page).to have_content(group.name)
end
end
end