diff options
-rw-r--r-- | app/views/shared/milestones/_milestone.html.haml | 3 | ||||
-rw-r--r-- | changelogs/unreleased/49292-add-group-name-badge-under-milestone.yml | 5 | ||||
-rw-r--r-- | spec/features/dashboard/milestones_spec.rb | 3 |
3 files changed, 11 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/changelogs/unreleased/49292-add-group-name-badge-under-milestone.yml b/changelogs/unreleased/49292-add-group-name-badge-under-milestone.yml new file mode 100644 index 00000000000..69089cfe357 --- /dev/null +++ b/changelogs/unreleased/49292-add-group-name-badge-under-milestone.yml @@ -0,0 +1,5 @@ +--- +title: Add group name badge under group milestone +merge_request: 21384 +author: +type: added 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 |