Commit 5af7dbe3 authored by Mike Greiling's avatar Mike Greiling

update milestone page tests

parent 47af1203
...@@ -36,7 +36,7 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps ...@@ -36,7 +36,7 @@ class Spinach::Features::GroupMilestones < Spinach::FeatureSteps
step 'I should see group milestone with all issues and MRs assigned to that milestone' do step 'I should see group milestone with all issues and MRs assigned to that milestone' do
expect(page).to have_content('Milestone GL-113') expect(page).to have_content('Milestone GL-113')
expect(page).to have_content('3 issues: 3 open and 0 closed') expect(page).to have_content('Issues 3 Open: 3 Closed: 0')
issue = Milestone.find_by(name: 'GL-113').issues.first issue = Milestone.find_by(name: 'GL-113').issues.first
expect(page).to have_link(issue.title, href: namespace_project_issue_path(issue.project.namespace, issue.project, issue)) expect(page).to have_link(issue.title, href: namespace_project_issue_path(issue.project.namespace, issue.project, issue))
end end
......
...@@ -23,12 +23,14 @@ feature 'Project milestone', :feature do ...@@ -23,12 +23,14 @@ feature 'Project milestone', :feature do
end end
it 'shows issues stats' do it 'shows issues stats' do
expect(page).to have_content 'issues:' expect(find('.milestone-sidebar')).to have_content 'Issues 0'
end end
it 'shows Browse Issues button' do it 'shows link to browse and add issues' do
within('#content-body') do within('.milestone-sidebar') do
expect(page).to have_link 'Browse Issues' expect(page).to have_link 'New issue'
expect(page).to have_link 'Open: 0'
expect(page).to have_link 'Closed: 0'
end end
end end
end end
...@@ -48,12 +50,12 @@ feature 'Project milestone', :feature do ...@@ -48,12 +50,12 @@ feature 'Project milestone', :feature do
end end
it 'hides issues stats' do it 'hides issues stats' do
expect(page).to have_no_content 'issues:' expect(find('.milestone-sidebar')).not_to have_content 'Issues 0'
end end
it 'hides Browse Issues button' do it 'hides new issue button' do
within('#content-body') do within('.milestone-sidebar') do
expect(page).not_to have_link 'Browse Issues' expect(page).not_to have_link 'New issue'
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