diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 18:42:06 +0000 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /spec/features/merge_request/user_posts_notes_spec.rb | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) | |
download | gitlab-ce-6e4e1050d9dba2b7b2523fdd1768823ab85feef4.tar.gz |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'spec/features/merge_request/user_posts_notes_spec.rb')
-rw-r--r-- | spec/features/merge_request/user_posts_notes_spec.rb | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/spec/features/merge_request/user_posts_notes_spec.rb b/spec/features/merge_request/user_posts_notes_spec.rb index 3c70819319d..4c079b98c90 100644 --- a/spec/features/merge_request/user_posts_notes_spec.rb +++ b/spec/features/merge_request/user_posts_notes_spec.rb @@ -10,6 +10,7 @@ RSpec.describe 'Merge request > User posts notes', :js do let(:merge_request) do create(:merge_request, source_project: project, target_project: project) end + let!(:note) do create(:note_on_merge_request, :with_attachment, noteable: merge_request, project: project) @@ -94,20 +95,31 @@ RSpec.describe 'Merge request > User posts notes', :js do end end - describe 'reply on a deleted conversation' do - before do - visit project_merge_request_path(project, merge_request) - end - - it 'shows an error message' do + describe 'replying to a comment' do + it 'makes the discussion resolvable' do find('.js-reply-button').click - note.delete page.within('.discussion-reply-holder') do fill_in 'note[note]', with: 'A reply' click_button 'Add comment now' - wait_for_requests - expect(page).to have_content('Your comment could not be submitted because discussion to reply to cannot be found') + + expect(page).to have_button('Resolve thread') + end + end + + context 'when comment is deleted' do + it 'shows an error message' do + find('.js-reply-button').click + + page.within('.discussion-reply-holder') do + fill_in 'note[note]', with: 'A reply' + + note.delete + + click_button 'Add comment now' + + expect(page).to have_content('Your comment could not be submitted because discussion to reply to cannot be found') + end end end end |