Commit a28a0c60 authored by Clement Ho's avatar Clement Ho Committed by Phil Hughes

Fix resolved discussions not expanding on side by side view

parent e4b465d7
......@@ -4,7 +4,7 @@
%td.notes_line.old
%td.notes_content.parallel.old
.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
%td.notes_line.old= ("")
%td.notes_content.parallel.old
......@@ -14,7 +14,7 @@
%td.notes_line.new
%td.notes_content.parallel.new
.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
%td.notes_line.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
visit_merge_request
end
describe 'timeline view' do
it 'hides when resolve discussion is clicked' do
expect(page).to have_selector('.discussion-body', visible: false)
end
......@@ -108,6 +109,24 @@ feature 'Diff notes resolve', :js do
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
page.within '.diff-content' do
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