Commit 81bc745b authored by Sean McGivern's avatar Sean McGivern

Merge branch '49292-add-group-name-badge-under-milestone' into 'master'

Add group name badge under group milestone

Closes #49292

See merge request gitlab-org/gitlab-ce!21384
parents 8e2dec76 c1f2c5fb
...@@ -16,6 +16,9 @@ ...@@ -16,6 +16,9 @@
= milestone_date_range(milestone) = milestone_date_range(milestone)
%div %div
= render('shared/milestone_expired', milestone: milestone) = 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? - if milestone.legacy_group_milestone?
.projects .projects
- milestone.milestones.each do |milestone| - milestone.milestones.each do |milestone|
......
---
title: Add group name badge under group milestone
merge_request: 21384
author:
type: added
...@@ -13,8 +13,10 @@ describe 'Dashboard > Milestones' do ...@@ -13,8 +13,10 @@ describe 'Dashboard > Milestones' do
describe 'as logged-in user' do describe 'as logged-in user' do
let(:user) { create(:user) } let(:user) { create(:user) }
let(:group) { create(:group) }
let(:project) { create(:project, namespace: user.namespace) } let(:project) { create(:project, namespace: user.namespace) }
let!(:milestone) { create(:milestone, project: project) } let!(:milestone) { create(:milestone, project: project) }
let!(:milestone2) { create(:milestone, group: group) }
before do before do
project.add_maintainer(user) project.add_maintainer(user)
sign_in(user) sign_in(user)
...@@ -24,6 +26,7 @@ describe 'Dashboard > Milestones' do ...@@ -24,6 +26,7 @@ describe 'Dashboard > Milestones' do
it 'sees milestones' do it 'sees milestones' do
expect(current_path).to eq dashboard_milestones_path expect(current_path).to eq dashboard_milestones_path
expect(page).to have_content(milestone.title) expect(page).to have_content(milestone.title)
expect(page).to have_content(group.name)
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment