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

Fix resolved discussions not expanding on side by side view

parent 51beed92eea5
......@@ -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,14 +97,33 @@
visit_merge_request
end
it 'hides when resolve discussion is clicked' do
expect(page).to have_selector('.discussion-body', visible: false)
describe 'timeline view' do
it 'hides when resolve discussion is clicked' do
expect(page).to have_selector('.discussion-body', visible: false)
end
it 'shows resolved discussion when toggled' do
find(".timeline-content .discussion[data-discussion-id='#{note.discussion_id}'] .discussion-toggle-button").click
expect(page.find(".timeline-content #note_#{note.noteable_id}")).to be_visible
end
end
it 'shows resolved discussion when toggled' do
find(".timeline-content .discussion[data-discussion-id='#{note.discussion_id}'] .discussion-toggle-button").click
describe 'side-by-side view' do
before do
page.within('.merge-request-tabs') { click_link 'Changes' }
page.find('#parallel-diff-btn').click
end
expect(page.find(".timeline-content #note_#{note.noteable_id}")).to be_visible
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
......
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