Merge branch '31292-milestone-sidebar-display-incorect-number-of-mr-when-minimized' into 'master'
Resolve "Milestone sidebar display incorect number of MR when minimized" Closes #31292 See merge request !10933
This commit is contained in:
commit
976b020aa3
3 changed files with 29 additions and 1 deletions
|
@ -89,7 +89,7 @@
|
|||
.sidebar-collapsed-icon
|
||||
%strong
|
||||
= icon('exclamation', 'aria-hidden': 'true')
|
||||
%span= milestone.issues_visible_to_user(current_user).count
|
||||
%span= milestone.merge_requests.count
|
||||
.title.hide-collapsed
|
||||
Merge requests
|
||||
%span.badge= milestone.merge_requests.count
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: Fixed milestone sidebar showing incorrect number of MRs when collapsed
|
||||
merge_request: 10933
|
||||
author:
|
|
@ -63,4 +63,28 @@ feature 'Project milestone', :feature do
|
|||
expect(page).not_to have_content('Assign some issues to this milestone.')
|
||||
end
|
||||
end
|
||||
|
||||
context 'when project has an issue' do
|
||||
before do
|
||||
create(:issue, project: project, milestone: milestone)
|
||||
|
||||
visit namespace_project_milestone_path(project.namespace, project, milestone)
|
||||
end
|
||||
|
||||
describe 'the collapsed sidebar' do
|
||||
before do
|
||||
find('.milestone-sidebar .gutter-toggle').click
|
||||
end
|
||||
|
||||
it 'shows the total MR and issue counts' do
|
||||
find('.milestone-sidebar .block', match: :first)
|
||||
blocks = all('.milestone-sidebar .block')
|
||||
|
||||
aggregate_failures 'MR and issue blocks' do
|
||||
expect(blocks[3]).to have_content 1
|
||||
expect(blocks[4]).to have_content 0
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue