Commit 6637c1e475e1e5845edfb6817a9a8074036275b7

Authored by Sytse Sijbrandij
1 parent 642f9f4a

Incorporated the two suggestions (h5 and named variables) and fixed the Spinach test.

app/views/milestones/_issues.html.haml
1 1 .span6
2 2 .ui-box.milestone-issue-filter
3   - .title
4   - %ul.nav.nav-pills
5   - %li=issues.first
  3 + %h5.title= title
6 4 %ul.well-list
7   - - issues.second.each do |issue|
  5 + - issues.each do |issue|
8 6 %li{data: {closed: issue.closed?}}
9 7 = link_to [@project, issue] do
10 8 %span.badge.badge-info ##{issue.id}
... ...
app/views/milestones/show.html.haml
... ... @@ -56,9 +56,9 @@
56 56  
57 57  
58 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 63 .row
64 64 .span6
... ... @@ -75,7 +75,7 @@
75 75 –
76 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 80 %hr
81 81 %h6 Participants:
... ...
features/project/issues/milestones.feature
... ... @@ -22,5 +22,3 @@ Feature: Project Milestones
22 22 Given the milestone has open and closed issues
23 23 And I click link "v2.2"
24 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 51  
52 52 Then "I should see 3 issues" do
53 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 54 end
61 55 end
... ...