summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinnie Hellmann <winnie@gitlab.com>2018-12-14 11:49:53 +0000
committerFatih Acet <acetfatih@gmail.com>2018-12-14 11:49:53 +0000
commita2e9ad83f406f2a0ca9e7766a3f41de1f9aadd9a (patch)
treec276ce662d842ed8f403ed2121e8c841c28ae8fd
parente8a7836cee837d71bb0155c01ebb79deaebbbfdb (diff)
downloadgitlab-ce-a2e9ad83f406f2a0ca9e7766a3f41de1f9aadd9a.tar.gz
Display reply field if resolved discussion has no replies
-rw-r--r--app/assets/javascripts/notes/components/noteable_discussion.vue2
-rw-r--r--changelogs/unreleased/winh-resolved-discussions-reply-field.yml5
-rw-r--r--spec/support/features/discussion_comments_shared_example.rb10
3 files changed, 16 insertions, 1 deletions
diff --git a/app/assets/javascripts/notes/components/noteable_discussion.vue b/app/assets/javascripts/notes/components/noteable_discussion.vue
index 4156fe0d229..07c938a0021 100644
--- a/app/assets/javascripts/notes/components/noteable_discussion.vue
+++ b/app/assets/javascripts/notes/components/noteable_discussion.vue
@@ -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"
>
diff --git a/changelogs/unreleased/winh-resolved-discussions-reply-field.yml b/changelogs/unreleased/winh-resolved-discussions-reply-field.yml
new file mode 100644
index 00000000000..01cf35ae8a7
--- /dev/null
+++ b/changelogs/unreleased/winh-resolved-discussions-reply-field.yml
@@ -0,0 +1,5 @@
+---
+title: Display reply field if resolved discussion has no replies
+merge_request: 23801
+author:
+type: fixed
diff --git a/spec/support/features/discussion_comments_shared_example.rb b/spec/support/features/discussion_comments_shared_example.rb
index 922f3df144d..42a086d58d2 100644
--- a/spec/support/features/discussion_comments_shared_example.rb
+++ b/spec/support/features/discussion_comments_shared_example.rb
@@ -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')