Commit f3043def authored by Kushal Pandya's avatar Kushal Pandya

Merge branch 'ph/fixNewNoteReplyResolvingThreadIncorrectly' into 'master'

Fixes new discussions getting auto resolved

See merge request gitlab-org/gitlab!46001
parents fd890c34 5f23025d
......@@ -10,7 +10,7 @@ export default {
const { notes, resolved } = this.discussion;
if (this.glFeatures.removeResolveNote) {
return resolved;
return Boolean(resolved);
}
if (notes) {
......
......@@ -30,6 +30,27 @@ RSpec.describe 'User comments on a merge request', :js do
end
end
it 'replys to a new comment' do
page.within('.js-main-target-form') do
fill_in('note[note]', with: 'comment 1')
click_button('Comment')
end
wait_for_requests
page.within('.note') do
click_button('Reply to comment')
fill_in('note[note]', with: 'comment 2')
click_button('Add comment now')
end
wait_for_requests
# Test that the discussion doesn't get auto-resolved
expect(page).to have_button('Resolve thread')
end
it 'loads new comment' do
# Add new comment in background in order to check
# if it's going to be loaded automatically for current user.
......
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