summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2017-07-22 23:46:50 +0300
committerFatih Acet <acetfatih@gmail.com>2017-07-22 23:46:50 +0300
commitfbdc02adc1682fe40c68e850496d94b89491a6f9 (patch)
treea0995ece383a5ba226dcd85c79b59e1bc541e261
parent33c20468cc2456c03431a1e32d84cd1fb31ea3c5 (diff)
downloadgitlab-ce-fbdc02adc1682fe40c68e850496d94b89491a6f9.tar.gz
IssueNotesRefactor: Temp workaround for a failing test.
-rw-r--r--spec/features/merge_requests/user_uses_slash_commands_spec.rb2
-rw-r--r--spec/support/quick_actions_helpers.rb7
2 files changed, 6 insertions, 3 deletions
diff --git a/spec/features/merge_requests/user_uses_slash_commands_spec.rb b/spec/features/merge_requests/user_uses_slash_commands_spec.rb
index 3ad7e68f2ed..ce403de0526 100644
--- a/spec/features/merge_requests/user_uses_slash_commands_spec.rb
+++ b/spec/features/merge_requests/user_uses_slash_commands_spec.rb
@@ -78,7 +78,7 @@ feature 'Merge Requests > User uses quick actions', feature: true, js: true do
describe 'merging the MR from the note' do
context 'when the current user can merge the MR' do
it 'merges the MR' do
- write_note("/merge")
+ write_note("/merge", false)
expect(page).to have_content 'Commands applied'
diff --git a/spec/support/quick_actions_helpers.rb b/spec/support/quick_actions_helpers.rb
index f84938df3f0..e1f4a8f0a57 100644
--- a/spec/support/quick_actions_helpers.rb
+++ b/spec/support/quick_actions_helpers.rb
@@ -1,10 +1,13 @@
module QuickActionsHelpers
- def write_note(text)
+ def write_note(text, wait = true)
Sidekiq::Testing.fake! do
page.within('.js-main-target-form') do
fill_in 'note[note]', with: text
find('.js-comment-submit-button').trigger('click')
- wait_for_requests
+
+ if wait
+ wait_for_requests
+ end
end
end
end