Commit 3ca92534 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'fix-expandable-diffs' into 'master'

Fix expandable diffs

## What does this MR do?

Fix expandable diffs and the master build.

## Are there points in the code the reviewer needs to double check?

Nope.

## Why was this MR needed?

https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/4776#note_13003494

Doesn't need a CHANGELOG entry etc.

See merge request !5200
parents c0bad6cb cdc031b6
class @Diff class @Diff
UNFOLD_COUNT = 20 UNFOLD_COUNT = 20
constructor: -> constructor: ->
$('.files .diff-file').singleFileDiff()
@filesCommentButton = $('.files .diff-file').filesCommentButton() @filesCommentButton = $('.files .diff-file').filesCommentButton()
$(document).off('click', '.js-unfold') $(document).off('click', '.js-unfold')
......
...@@ -106,7 +106,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do ...@@ -106,7 +106,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
let(:comment_text) { 'A comment' } let(:comment_text) { 'A comment' }
before do before do
large_diff.find('.line_holder', match: :prefer_exact).hover large_diff.find('.diff-line-num', match: :prefer_exact).hover
large_diff.find('.add-diff-note').click large_diff.find('.add-diff-note').click
large_diff.find('.note-textarea').send_keys comment_text large_diff.find('.note-textarea').send_keys comment_text
large_diff.find_button('Comment').click large_diff.find_button('Comment').click
...@@ -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
end end
it 'does not make a new HTTP request' do it 'does not make a new HTTP request' do
expect(evaluate_script('ajaxUris')).to be_empty expect(evaluate_script('ajaxUris')).not_to include(a_string_matching('small_diff.md'))
end end
end end
end end
...@@ -199,7 +199,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do ...@@ -199,7 +199,7 @@ feature 'Expand and collapse diffs', js: true, feature: true do
end end
it 'does not make a new HTTP request' do it 'does not make a new HTTP request' do
expect(evaluate_script('ajaxUris')).to be_empty expect(evaluate_script('ajaxUris')).not_to include(a_string_matching('small_diff.md'))
end end
end end
end end
......
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