diff options
author | Robert Speicher <rspeicher@gmail.com> | 2012-10-10 13:06:54 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2012-10-10 13:08:36 -0400 |
commit | bf1554f8c49d8243abadaf0078fbecf3ebdfaf93 (patch) | |
tree | 7782ac60bb7a9401c622c7d994ecf3ef165b3643 /features | |
parent | 7d145adf35b53fae3a512d433f23ee911b4f5d39 (diff) | |
download | gitlab-ce-bf1554f8c49d8243abadaf0078fbecf3ebdfaf93.tar.gz |
Add Feature for milestone issue filter
Closes #1167
Diffstat (limited to 'features')
-rw-r--r-- | features/project/issues/milestones.feature | 8 | ||||
-rw-r--r-- | features/steps/project/project_milestones.rb | 22 |
2 files changed, 30 insertions, 0 deletions
diff --git a/features/project/issues/milestones.feature b/features/project/issues/milestones.feature index a57f67d6815..50c090cc6a0 100644 --- a/features/project/issues/milestones.feature +++ b/features/project/issues/milestones.feature @@ -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 diff --git a/features/steps/project/project_milestones.rb b/features/steps/project/project_milestones.rb index 83ed6859f1b..4d689c95d25 100644 --- a/features/steps/project/project_milestones.rb +++ b/features/steps/project/project_milestones.rb @@ -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 |