Commit c46ff7de authored by Eric Eastwood's avatar Eric Eastwood

Fix flakey time-sensitive specs that rely on notes background Sidekiq jobs

Fix https://gitlab.com/gitlab-org/gitlab-ce/issues/48093

We use `perform_enqueued_jobs` because it is "adapter-agnostic so it's better to use it over Sidekiq::Testing.inline!." -- https://gitlab.com/gitlab-org/gitlab-ce/issues/22991
parent 69966fcb
...@@ -13,7 +13,7 @@ module Spec ...@@ -13,7 +13,7 @@ module Spec
module Features module Features
module NotesHelpers module NotesHelpers
def add_note(text) def add_note(text)
Sidekiq::Testing.fake! do perform_enqueued_jobs do
page.within(".js-main-target-form") do page.within(".js-main-target-form") do
fill_in("note[note]", with: text) fill_in("note[note]", with: text)
find(".js-comment-submit-button").click find(".js-comment-submit-button").click
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment