Commit 6a3d8ac2 authored by Phil Hughes's avatar Phil Hughes

Spec updates

parent 31fea922
...@@ -33,7 +33,7 @@ feature 'Issue filtering by Milestone', feature: true do ...@@ -33,7 +33,7 @@ feature 'Issue filtering by Milestone', feature: true do
visit_issues(project) visit_issues(project)
filter_by_milestone(Milestone::Upcoming.title) filter_by_milestone(Milestone::Upcoming.title)
expect(page).to have_css('.issue .title', count: 1) expect(page).to have_css('.issue', count: 1)
end end
it 'should not show issues in past' do it 'should not show issues in past' do
...@@ -44,7 +44,7 @@ feature 'Issue filtering by Milestone', feature: true do ...@@ -44,7 +44,7 @@ feature 'Issue filtering by Milestone', feature: true do
visit_issues(project) visit_issues(project)
filter_by_milestone(Milestone::Upcoming.title) filter_by_milestone(Milestone::Upcoming.title)
expect(page).to have_css('.issue .title', count: 0) expect(page).to have_css('.issue', count: 0)
end end
end end
...@@ -55,7 +55,7 @@ feature 'Issue filtering by Milestone', feature: true do ...@@ -55,7 +55,7 @@ feature 'Issue filtering by Milestone', feature: true do
visit_issues(project) visit_issues(project)
filter_by_milestone(milestone.title) filter_by_milestone(milestone.title)
expect(page).to have_css('.issue .title', count: 1) expect(page).to have_css('.issue', count: 1)
end end
def visit_issues(project) def visit_issues(project)
...@@ -64,8 +64,6 @@ feature 'Issue filtering by Milestone', feature: true do ...@@ -64,8 +64,6 @@ feature 'Issue filtering by Milestone', feature: true do
def filter_by_milestone(title) def filter_by_milestone(title)
find(".js-milestone-select").click find(".js-milestone-select").click
sleep 0.5
find(".milestone-filter .dropdown-content a", text: title).click find(".milestone-filter .dropdown-content a", text: title).click
sleep 1
end end
end end
...@@ -33,7 +33,7 @@ feature 'Merge Request filtering by Milestone', feature: true do ...@@ -33,7 +33,7 @@ feature 'Merge Request filtering by Milestone', feature: true do
visit_merge_requests(project) visit_merge_requests(project)
filter_by_milestone(Milestone::Upcoming.title) filter_by_milestone(Milestone::Upcoming.title)
expect(page).to have_css('.merge-request-title', count: 1) expect(page).to have_css('.merge-request', count: 1)
end end
it 'should not show issues in past' do it 'should not show issues in past' do
...@@ -44,7 +44,7 @@ feature 'Merge Request filtering by Milestone', feature: true do ...@@ -44,7 +44,7 @@ feature 'Merge Request filtering by Milestone', feature: true do
visit_merge_requests(project) visit_merge_requests(project)
filter_by_milestone(Milestone::Upcoming.title) filter_by_milestone(Milestone::Upcoming.title)
expect(page).to have_css('.merge-request-title', count: 0) expect(page).to have_css('.merge-request', count: 0)
end end
end end
...@@ -55,7 +55,7 @@ feature 'Merge Request filtering by Milestone', feature: true do ...@@ -55,7 +55,7 @@ feature 'Merge Request filtering by Milestone', feature: true do
visit_merge_requests(project) visit_merge_requests(project)
filter_by_milestone(milestone.title) filter_by_milestone(milestone.title)
expect(page).to have_css('.merge-request-title', count: 1) expect(page).to have_css('.merge-request', count: 1)
end end
def visit_merge_requests(project) def visit_merge_requests(project)
......
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