diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 14:18:50 +0300 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/support/shared_examples/features | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/support/shared_examples/features')
-rw-r--r-- | spec/support/shared_examples/features/comments_on_merge_request_files_shared_examples.rb | 3 | ||||
-rw-r--r-- | spec/support/shared_examples/features/discussion_comments_shared_example.rb | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/spec/support/shared_examples/features/comments_on_merge_request_files_shared_examples.rb b/spec/support/shared_examples/features/comments_on_merge_request_files_shared_examples.rb index fb3b17d05ee..e0a032b1a43 100644 --- a/spec/support/shared_examples/features/comments_on_merge_request_files_shared_examples.rb +++ b/spec/support/shared_examples/features/comments_on_merge_request_files_shared_examples.rb @@ -6,13 +6,14 @@ RSpec.shared_examples 'comment on merge request file' do page.within('.js-discussion-note-form') do fill_in(:note_note, with: 'Line is wrong') - click_button('Comment') + find('.js-comment-button').click end wait_for_requests page.within('.notes_holder') do expect(page).to have_content('Line is wrong') + expect(page).not_to have_content('Comment on lines') end visit(merge_request_path(merge_request)) diff --git a/spec/support/shared_examples/features/discussion_comments_shared_example.rb b/spec/support/shared_examples/features/discussion_comments_shared_example.rb index 81433d124c9..6007798c290 100644 --- a/spec/support/shared_examples/features/discussion_comments_shared_example.rb +++ b/spec/support/shared_examples/features/discussion_comments_shared_example.rb @@ -15,7 +15,7 @@ RSpec.shared_examples 'thread comments' do |resource_name| find("#{form_selector} .note-textarea").send_keys(comment) - click_button 'Comment' + find('.js-comment-button').click expect(page).to have_content(comment) @@ -30,6 +30,8 @@ RSpec.shared_examples 'thread comments' do |resource_name| click_button 'Comment & close issue' + wait_for_all_requests + expect(page).to have_content(comment) expect(page).to have_content "@#{user.username} closed" @@ -144,7 +146,7 @@ RSpec.shared_examples 'thread comments' do |resource_name| find("#{comments_selector} .js-vue-discussion-reply").click find("#{comments_selector} .note-textarea").send_keys(text) - click_button "Comment" + find("#{comments_selector} .js-comment-button").click wait_for_requests end |