Commit bf1554f8 authored by Robert Speicher's avatar Robert Speicher

Add Feature for milestone issue filter

Closes #1167
parent 7d145adf
......@@ -16,3 +16,11 @@ Feature: Project Milestones
Given I click link "New Milestone"
And I submit new milestone "v2.3"
Then I should see milestone "v2.3"
@javascript
Scenario: Listing closed issues
Given the milestone has open and closed issues
And I click link "v2.2"
Then I should see 3 issues
When I click link "All Issues"
Then I should see 4 issues
......@@ -36,4 +36,26 @@ class ProjectMilestones < Spinach::FeatureSteps
3.times { Factory :issue, :project => project, :milestone => milestone }
end
Given 'the milestone has open and closed issues' do
project = Project.find_by_name("Shop")
milestone = project.milestones.find_by_title('v2.2')
# 3 Open issues created above; create one closed issue
create(:closed_issue, project: project, milestone: milestone)
end
When 'I click link "All Issues"' do
click_link 'All Issues'
end
Then "I should see 3 issues" do
page.should have_selector('.milestone-issue-filter tbody tr', count: 4)
page.should have_selector('.milestone-issue-filter tbody tr.hide', count: 1)
end
Then "I should see 4 issues" do
page.should have_selector('.milestone-issue-filter tbody tr', count: 4)
page.should_not have_selector('.milestone-issue-filter tbody tr.hide')
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