Commit 6637c1e475e1e5845edfb6817a9a8074036275b7
1 parent
642f9f4a
Exists in
master
and in
4 other branches
Incorporated the two suggestions (h5 and named variables) and fixed the Spinach test.
Showing
4 changed files
with
5 additions
and
15 deletions
Show diff stats
app/views/milestones/_issues.html.haml
| 1 | .span6 | 1 | .span6 |
| 2 | .ui-box.milestone-issue-filter | 2 | .ui-box.milestone-issue-filter |
| 3 | - .title | ||
| 4 | - %ul.nav.nav-pills | ||
| 5 | - %li=issues.first | 3 | + %h5.title= title |
| 6 | %ul.well-list | 4 | %ul.well-list |
| 7 | - - issues.second.each do |issue| | 5 | + - issues.each do |issue| |
| 8 | %li{data: {closed: issue.closed?}} | 6 | %li{data: {closed: issue.closed?}} |
| 9 | = link_to [@project, issue] do | 7 | = link_to [@project, issue] do |
| 10 | %span.badge.badge-info ##{issue.id} | 8 | %span.badge.badge-info ##{issue.id} |
app/views/milestones/show.html.haml
| @@ -56,9 +56,9 @@ | @@ -56,9 +56,9 @@ | ||
| 56 | 56 | ||
| 57 | 57 | ||
| 58 | .row | 58 | .row |
| 59 | - =render(:partial => 'issues', :object => ['Unstarted Issues (open and unassigned)', @issues.opened.unassigned]) | 59 | + =render(partial: 'issues', :locals => {title: 'Unstarted Issues (open and unassigned)', issues: @issues.opened.unassigned}) |
| 60 | 60 | ||
| 61 | - =render(:partial => 'issues', :object => ['Ongoing Issues (open and assigned) ', @issues.opened.assigned]) | 61 | + =render(partial: 'issues', :locals => {title: 'Ongoing Issues (open and assigned)', issues: @issues.opened.assigned}) |
| 62 | 62 | ||
| 63 | .row | 63 | .row |
| 64 | .span6 | 64 | .span6 |
| @@ -75,7 +75,7 @@ | @@ -75,7 +75,7 @@ | ||
| 75 | – | 75 | – |
| 76 | = link_to_gfm truncate(merge_request.title, length: 60), [@project, merge_request] | 76 | = link_to_gfm truncate(merge_request.title, length: 60), [@project, merge_request] |
| 77 | 77 | ||
| 78 | - =render(:partial => 'issues', :object => ['Completed Issues (closed)', @issues.closed]) | 78 | + =render(:partial => 'issues', :locals => {title: 'Completed Issues (closed)', issues: @issues.closed}) |
| 79 | 79 | ||
| 80 | %hr | 80 | %hr |
| 81 | %h6 Participants: | 81 | %h6 Participants: |
features/project/issues/milestones.feature
| @@ -22,5 +22,3 @@ Feature: Project Milestones | @@ -22,5 +22,3 @@ Feature: Project Milestones | ||
| 22 | Given the milestone has open and closed issues | 22 | Given the milestone has open and closed issues |
| 23 | And I click link "v2.2" | 23 | And I click link "v2.2" |
| 24 | Then I should see 3 issues | 24 | Then I should see 3 issues |
| 25 | - When I click link "All Issues" | ||
| 26 | - Then I should see 4 issues |
features/steps/project/project_milestones.rb
| @@ -51,11 +51,5 @@ class ProjectMilestones < Spinach::FeatureSteps | @@ -51,11 +51,5 @@ class ProjectMilestones < Spinach::FeatureSteps | ||
| 51 | 51 | ||
| 52 | Then "I should see 3 issues" do | 52 | Then "I should see 3 issues" do |
| 53 | page.should have_selector('.milestone-issue-filter .well-list li', count: 4) | 53 | page.should have_selector('.milestone-issue-filter .well-list li', count: 4) |
| 54 | - page.should have_selector('.milestone-issue-filter .well-list li.hide', count: 1) | ||
| 55 | - end | ||
| 56 | - | ||
| 57 | - Then "I should see 4 issues" do | ||
| 58 | - page.should have_selector('.milestone-issue-filter .well-list li', count: 4) | ||
| 59 | - page.should_not have_selector('.milestone-issue-filter .well-list li.hide') | ||
| 60 | end | 54 | end |
| 61 | end | 55 | end |