BigW Consortium Gitlab

Commit c02baddf by Clement Ho Committed by Winnie Hellmann

Force non diff resolved discussion to display when collapse toggled

parent 018542b1
...@@ -44,4 +44,4 @@ ...@@ -44,4 +44,4 @@
= render "discussions/diff_with_notes", discussion: discussion = render "discussions/diff_with_notes", discussion: discussion
- else - else
.panel.panel-default .panel.panel-default
= render "discussions/notes", discussion: discussion = render partial: "discussions/notes", locals: { discussion: discussion, disable_collapse_class: true }
---
title: Force non diff resolved discussion to display when collapse toggled
merge_request:
author:
type: fixed
...@@ -121,16 +121,33 @@ shared_examples 'discussion comments' do |resource_name| ...@@ -121,16 +121,33 @@ shared_examples 'discussion comments' do |resource_name|
end end
end end
it 'clicking "Start discussion" will post a discussion' do describe 'creating a discussion' do
before do
find(submit_selector).click find(submit_selector).click
find(comments_selector, match: :first) find(comments_selector, match: :first)
end
it 'clicking "Start discussion" will post a discussion' do
new_comment = all(comments_selector).last new_comment = all(comments_selector).last
expect(new_comment).to have_content 'a' expect(new_comment).to have_content 'a'
expect(new_comment).to have_selector '.discussion' expect(new_comment).to have_selector '.discussion'
end end
if resource_name == 'merge request'
it 'shows resolved discussion when toggled' do
click_button "Resolve discussion"
expect(page).to have_selector('.note-row-1', visible: true)
refresh
click_button "Toggle discussion"
expect(page).to have_selector('.note-row-1', visible: true)
end
end
end
if resource_name == 'issue' if resource_name == 'issue'
it "clicking 'Start discussion & close #{resource_name}' will post a discussion and close the #{resource_name}" do it "clicking 'Start discussion & close #{resource_name}' will post a discussion and close the #{resource_name}" do
find(close_selector).click find(close_selector).click
......
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