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
This commit is contained in:
Eric Eastwood 2018-06-18 19:00:25 -05:00
parent 69966fcb8d
commit c46ff7de67
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ module Spec
module Features
module NotesHelpers
def add_note(text)
Sidekiq::Testing.fake! do
perform_enqueued_jobs do
page.within(".js-main-target-form") do
fill_in("note[note]", with: text)
find(".js-comment-submit-button").click