Display reply field if resolved discussion has no replies

This commit is contained in:
Winnie Hellmann 2018-12-14 11:49:53 +00:00 committed by Fatih Acet
parent e8a7836cee
commit a2e9ad83f4
3 changed files with 16 additions and 1 deletions

View file

@ -413,7 +413,7 @@ Please check your network connection and try again.`;
</template>
</ul>
<div
v-if="!isRepliesCollapsed"
v-if="!isRepliesCollapsed || !hasReplies"
:class="{ 'is-replying': isReplying }"
class="discussion-reply-holder"
>

View file

@ -0,0 +1,5 @@
---
title: Display reply field if resolved discussion has no replies
merge_request: 23801
author:
type: fixed

View file

@ -178,6 +178,16 @@ shared_examples 'discussion comments' do |resource_name|
let(:note_id) { find("#{comments_selector} .note:first-child", match: :first)['data-note-id'] }
let(:reply_id) { find("#{comments_selector} .note:last-child", match: :first)['data-note-id'] }
it 'can be replied to after resolving' do
click_button "Resolve discussion"
wait_for_requests
refresh
wait_for_requests
submit_reply('to reply or not reply')
end
it 'shows resolved discussion when toggled' do
submit_reply('a')