summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-04-28 14:03:16 +0000
committerLin Jen-Shin <godfat@godfat.org>2017-04-28 23:05:55 +0800
commit47dee0f535ade277006802128f5dbbe16d9c8b45 (patch)
tree075f31bfa9cbe7f0e80130d7fb50a4c29b0d2089
parentdf413a6c89a908afedbc1f7f9bf6510a3d6b5b04 (diff)
downloadgitlab-ce-47dee0f535ade277006802128f5dbbe16d9c8b45.tar.gz
Merge branch 'fix-sidebar-block-ref-test' into 'master'
add issues and merge-requests classes and use to find in rspec See merge request !10980
-rw-r--r--app/views/shared/milestones/_sidebar.html.haml4
-rw-r--r--spec/features/projects/milestones/milestone_spec.rb5
2 files changed, 4 insertions, 5 deletions
diff --git a/app/views/shared/milestones/_sidebar.html.haml b/app/views/shared/milestones/_sidebar.html.haml
index 774d20fb5ba..5e8a2a0f5d8 100644
--- a/app/views/shared/milestones/_sidebar.html.haml
+++ b/app/views/shared/milestones/_sidebar.html.haml
@@ -64,7 +64,7 @@
%span.remaining-days= remaining_days
- if !project || can?(current_user, :read_issue, project)
- .block
+ .block.issues
.sidebar-collapsed-icon
%strong
= icon('hashtag', 'aria-hidden': 'true')
@@ -85,7 +85,7 @@
Closed:
= milestone.issues_visible_to_user(current_user).closed.count
- .block
+ .block.merge-requests
.sidebar-collapsed-icon
%strong
= icon('exclamation', 'aria-hidden': 'true')
diff --git a/spec/features/projects/milestones/milestone_spec.rb b/spec/features/projects/milestones/milestone_spec.rb
index 5e19907eef9..b4fc0edbde8 100644
--- a/spec/features/projects/milestones/milestone_spec.rb
+++ b/spec/features/projects/milestones/milestone_spec.rb
@@ -78,11 +78,10 @@ feature 'Project milestone', :feature do
it 'shows the total MR and issue counts' do
find('.milestone-sidebar .block', match: :first)
- blocks = all('.milestone-sidebar .block')
aggregate_failures 'MR and issue blocks' do
- expect(blocks[3]).to have_content 1
- expect(blocks[4]).to have_content 0
+ expect(find('.milestone-sidebar .block.issues')).to have_content 1
+ expect(find('.milestone-sidebar .block.merge-requests')).to have_content 0
end
end
end