summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/features/discussion_comments_shared_example.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared_examples/features/discussion_comments_shared_example.rb')
-rw-r--r--spec/support/shared_examples/features/discussion_comments_shared_example.rb6
1 files changed, 4 insertions, 2 deletions
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