Commit 83e2bfba authored by Annabel Dunstone Gray's avatar Annabel Dunstone Gray

Fix expand_collapse_diffs specs

parent 6cb7dc7a
...@@ -117,7 +117,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do ...@@ -117,7 +117,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
# Wait for diffs # Wait for diffs
find('.js-file-title', match: :first) find('.js-file-title', match: :first)
# Click `large_diff.md` title # Click `large_diff.md` title
all('.js-file-title')[1].click all('.diff-toggle-caret')[1].click
wait_for_ajax wait_for_ajax
end end
...@@ -161,7 +161,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do ...@@ -161,7 +161,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
# Wait for diffs # Wait for diffs
find('.js-file-title', match: :first) find('.js-file-title', match: :first)
# Click `large_diff.md` title # Click `large_diff.md` title
all('.js-file-title')[1].click all('.diff-toggle-caret')[1].click
wait_for_ajax wait_for_ajax
end end
...@@ -183,7 +183,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do ...@@ -183,7 +183,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
# Wait for diffs # Wait for diffs
find('.js-file-title', match: :first) find('.js-file-title', match: :first)
# Click `small_diff.md` title # Click `small_diff.md` title
all('.js-file-title')[3].click all('.diff-toggle-caret')[3].click
end end
it 'hides the diff content' do it 'hides the diff content' do
...@@ -196,7 +196,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do ...@@ -196,7 +196,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
# Wait for diffs # Wait for diffs
find('.js-file-title', match: :first) find('.js-file-title', match: :first)
# Click `small_diff.md` title # Click `small_diff.md` title
all('.js-file-title')[3].click all('.diff-toggle-caret')[3].click
end end
it 'shows the diff content' do it 'shows the diff content' do
...@@ -292,7 +292,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do ...@@ -292,7 +292,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
# Wait for diffs # Wait for diffs
find('.js-file-title', match: :first) find('.js-file-title', match: :first)
# Click `small_diff.md` title # Click `small_diff.md` title
all('.js-file-title')[3].click all('.diff-toggle-caret')[3].click
end end
it 'hides the diff content' do it 'hides the diff content' do
...@@ -305,7 +305,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do ...@@ -305,7 +305,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
# Wait for diffs # Wait for diffs
find('.js-file-title', match: :first) find('.js-file-title', match: :first)
# Click `small_diff.md` title # Click `small_diff.md` title
all('.js-file-title')[3].click all('.diff-toggle-caret')[3].click
end end
it 'shows the diff content' do it 'shows the diff content' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment