diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-26 13:02:32 +0300 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-26 13:02:32 +0300 |
commit | 27317d55b0a2ad7d18b324fa30496f0acd07f211 (patch) | |
tree | 67d91009c58d2837b75b198f7539ba43d1b52fc5 | |
parent | aa364386d2c08298cc4a201b4a7d2f779ff6fbb6 (diff) |
Added test
-rw-r--r-- | spec/features/projects/milestones/milestone_spec.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/features/projects/milestones/milestone_spec.rb b/spec/features/projects/milestones/milestone_spec.rb index dab78fd3571..5e19907eef9 100644 --- a/spec/features/projects/milestones/milestone_spec.rb +++ b/spec/features/projects/milestones/milestone_spec.rb @@ -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 |