Commit acadf527 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'fix-resolved-side-by-side' into 'master'

Fix resolved discussions not expanding on side by side view

Closes #39209

See merge request gitlab-org/gitlab-ce!14918
parents e4b465d7 a28a0c60
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
%td.notes_line.old %td.notes_line.old
%td.notes_content.parallel.old %td.notes_content.parallel.old
.content{ class: ('hide' unless discussions_left.any?(&:expanded?)) } .content{ class: ('hide' unless discussions_left.any?(&:expanded?)) }
= render partial: "discussions/notes", collection: discussions_left, as: :discussion, line_type: 'old' = render partial: "discussions/notes", collection: discussions_left, as: :discussion, line_type: 'old', locals: { disable_collapse_class: true }
- else - else
%td.notes_line.old= ("") %td.notes_line.old= ("")
%td.notes_content.parallel.old %td.notes_content.parallel.old
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
%td.notes_line.new %td.notes_line.new
%td.notes_content.parallel.new %td.notes_content.parallel.new
.content{ class: ('hide' unless discussions_right.any?(&:expanded?)) } .content{ class: ('hide' unless discussions_right.any?(&:expanded?)) }
= render partial: "discussions/notes", collection: discussions_right, as: :discussion, line_type: 'new' = render partial: "discussions/notes", collection: discussions_right, as: :discussion, line_type: 'new', locals: { disable_collapse_class: true }
- else - else
%td.notes_line.new= ("") %td.notes_line.new= ("")
%td.notes_content.parallel.new %td.notes_content.parallel.new
......
---
title: Fix resolved discussions not expanding on side by side view
merge_request:
author:
type: fixed
...@@ -97,6 +97,7 @@ feature 'Diff notes resolve', :js do ...@@ -97,6 +97,7 @@ feature 'Diff notes resolve', :js do
visit_merge_request visit_merge_request
end end
describe 'timeline view' do
it 'hides when resolve discussion is clicked' do it 'hides when resolve discussion is clicked' do
expect(page).to have_selector('.discussion-body', visible: false) expect(page).to have_selector('.discussion-body', visible: false)
end end
...@@ -108,6 +109,24 @@ feature 'Diff notes resolve', :js do ...@@ -108,6 +109,24 @@ feature 'Diff notes resolve', :js do
end end
end end
describe 'side-by-side view' do
before do
page.within('.merge-request-tabs') { click_link 'Changes' }
page.find('#parallel-diff-btn').click
end
it 'hides when resolve discussion is clicked' do
expect(page).to have_selector('.diffs .diff-file .notes_holder', visible: false)
end
it 'shows resolved discussion when toggled' do
find('.diff-comment-avatar-holders').click
expect(find('.diffs .diff-file .notes_holder')).to be_visible
end
end
end
it 'allows user to resolve from reply form without a comment' do it 'allows user to resolve from reply form without a comment' do
page.within '.diff-content' do page.within '.diff-content' do
click_button 'Reply...' click_button 'Reply...'
......
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