summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2017-03-24 18:27:47 -0500
committerMike Greiling <mike@pixelcog.com>2017-03-25 00:33:45 -0500
commit5af7dbe37ace8d0a56a5e3df7c3de0e28a9d0859 (patch)
tree62cf57125e671799f4882bc0aaf8cd816ffade2a
parent47af12037b9247a65a50b8ab4e4a5f05c3731dea (diff)
downloadgitlab-ce-5af7dbe37ace8d0a56a5e3df7c3de0e28a9d0859.tar.gz
update milestone page tests
-rw-r--r--features/steps/group/milestones.rb2
-rw-r--r--spec/features/projects/milestones/milestone_spec.rb18
2 files changed, 11 insertions, 9 deletions
diff --git a/features/steps/group/milestones.rb b/features/steps/group/milestones.rb
index 20204ad8654..9996f3baf0d 100644
--- a/features/steps/group/milestones.rb
+++ b/features/steps/group/milestones.rb
@@ -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
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
expect(page).to have_link(issue.title, href: namespace_project_issue_path(issue.project.namespace, issue.project, issue))
end
diff --git a/spec/features/projects/milestones/milestone_spec.rb b/spec/features/projects/milestones/milestone_spec.rb
index df229d0aa78..dab78fd3571 100644
--- a/spec/features/projects/milestones/milestone_spec.rb
+++ b/spec/features/projects/milestones/milestone_spec.rb
@@ -23,12 +23,14 @@ feature 'Project milestone', :feature do
end
it 'shows issues stats' do
- expect(page).to have_content 'issues:'
+ expect(find('.milestone-sidebar')).to have_content 'Issues 0'
end
- it 'shows Browse Issues button' do
- within('#content-body') do
- expect(page).to have_link 'Browse Issues'
+ it 'shows link to browse and add issues' do
+ within('.milestone-sidebar') do
+ expect(page).to have_link 'New issue'
+ expect(page).to have_link 'Open: 0'
+ expect(page).to have_link 'Closed: 0'
end
end
end
@@ -48,12 +50,12 @@ feature 'Project milestone', :feature do
end
it 'hides issues stats' do
- expect(page).to have_no_content 'issues:'
+ expect(find('.milestone-sidebar')).not_to have_content 'Issues 0'
end
- it 'hides Browse Issues button' do
- within('#content-body') do
- expect(page).not_to have_link 'Browse Issues'
+ it 'hides new issue button' do
+ within('.milestone-sidebar') do
+ expect(page).not_to have_link 'New issue'
end
end