summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/support/features/discussion_comments_shared_example.rb17
-rw-r--r--spec/support/quick_actions_helpers.rb6
2 files changed, 10 insertions, 13 deletions
diff --git a/spec/support/features/discussion_comments_shared_example.rb b/spec/support/features/discussion_comments_shared_example.rb
index 1508783a166..831d0d5880c 100644
--- a/spec/support/features/discussion_comments_shared_example.rb
+++ b/spec/support/features/discussion_comments_shared_example.rb
@@ -11,6 +11,7 @@ shared_examples 'discussion comments' do |resource_name|
expect(page).to have_selector toggle_selector
find("#{form_selector} .note-textarea").send_keys('a')
+
find(submit_selector).click
wait_for_requests
@@ -75,17 +76,17 @@ shared_examples 'discussion comments' do |resource_name|
expect(page).not_to have_selector menu_selector
end
- # it 'clicking the ul padding or divider should not change the text' do
- # find(menu_selector).trigger 'click'
+ it 'clicking the ul padding or divider should not change the text' do
+ find(menu_selector).trigger 'click'
- # expect(page).to have_selector menu_selector
- # expect(find(dropdown_selector)).to have_content 'Comment'
+ expect(page).to have_selector menu_selector
+ expect(find(dropdown_selector)).to have_content 'Comment'
- # find("#{menu_selector} .divider").trigger 'click'
+ find("#{menu_selector} .divider").trigger 'click'
- # expect(page).to have_selector menu_selector
- # expect(find(dropdown_selector)).to have_content 'Comment'
- # end
+ expect(page).to have_selector menu_selector
+ expect(find(dropdown_selector)).to have_content 'Comment'
+ end
describe 'when selecting "Start discussion"' do
before do
diff --git a/spec/support/quick_actions_helpers.rb b/spec/support/quick_actions_helpers.rb
index e1f4a8f0a57..d2aaae7518f 100644
--- a/spec/support/quick_actions_helpers.rb
+++ b/spec/support/quick_actions_helpers.rb
@@ -1,13 +1,9 @@
module QuickActionsHelpers
- def write_note(text, wait = true)
+ def write_note(text)
Sidekiq::Testing.fake! do
page.within('.js-main-target-form') do
fill_in 'note[note]', with: text
find('.js-comment-submit-button').trigger('click')
-
- if wait
- wait_for_requests
- end
end
end
end