From 83e2bfbae04385e09dae924629ac6a9e22b3ad4c Mon Sep 17 00:00:00 2001
From: Annabel Dunstone Gray <annabel.dunstone@gmail.com>
Date: Thu, 9 Feb 2017 09:00:54 -0600
Subject: [PATCH] Fix expand_collapse_diffs specs

---
 spec/features/expand_collapse_diffs_spec.rb | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/spec/features/expand_collapse_diffs_spec.rb b/spec/features/expand_collapse_diffs_spec.rb
index 630467e647f..8c64b050e19 100644
--- a/spec/features/expand_collapse_diffs_spec.rb
+++ b/spec/features/expand_collapse_diffs_spec.rb
@@ -117,7 +117,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
         # Wait for diffs
         find('.js-file-title', match: :first)
         # Click `large_diff.md` title
-        all('.js-file-title')[1].click
+        all('.diff-toggle-caret')[1].click
         wait_for_ajax
       end
 
@@ -161,7 +161,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
               # Wait for diffs
               find('.js-file-title', match: :first)
               # Click `large_diff.md` title
-              all('.js-file-title')[1].click
+              all('.diff-toggle-caret')[1].click
               wait_for_ajax
             end
 
@@ -183,7 +183,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
         # Wait for diffs
         find('.js-file-title', match: :first)
         # Click `small_diff.md` title
-        all('.js-file-title')[3].click
+        all('.diff-toggle-caret')[3].click
       end
 
       it 'hides the diff content' do
@@ -196,7 +196,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
           # Wait for diffs
           find('.js-file-title', match: :first)
           # Click `small_diff.md` title
-          all('.js-file-title')[3].click
+          all('.diff-toggle-caret')[3].click
         end
 
         it 'shows the diff content' do
@@ -292,7 +292,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
         # Wait for diffs
         find('.js-file-title', match: :first)
         # Click `small_diff.md` title
-        all('.js-file-title')[3].click
+        all('.diff-toggle-caret')[3].click
       end
 
       it 'hides the diff content' do
@@ -305,7 +305,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
           # Wait for diffs
           find('.js-file-title', match: :first)
           # Click `small_diff.md` title
-          all('.js-file-title')[3].click
+          all('.diff-toggle-caret')[3].click
         end
 
         it 'shows the diff content' do
-- 
GitLab