Added test

This commit is contained in:
Luke "Jared" Bennett 2017-04-26 11:02:32 +01:00
parent aa364386d2
commit 27317d55b0
No known key found for this signature in database
GPG key ID: 402ED51FB5D306C2

View file

@ -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