Revert "DEV: Remove Jobs.run_immediately! for all system specs"

This reverts commit ed35ff0a7c.
This commit is contained in:
Martin Brennan 2023-01-03 13:39:06 +10:00
parent ed35ff0a7c
commit aebcdc6266
No known key found for this signature in database
GPG Key ID: A08063EEF3EA26A4
7 changed files with 11 additions and 11 deletions

View File

@ -53,7 +53,7 @@ RSpec.describe "Archive channel", type: :system, js: true do
end
context "when archiving" do
# before { Jobs.run_immediately! }
before { Jobs.run_immediately! }
it "works" do
chat.visit_channel_settings(channel_1)
@ -93,7 +93,7 @@ RSpec.describe "Archive channel", type: :system, js: true do
context "when archiving failed" do
before do
# Jobs.run_immediately!
Jobs.run_immediately!
channel_1.update!(status: :read_only)
end

View File

@ -39,7 +39,7 @@ RSpec.describe "Channel - Info - Members page", type: :system, js: true do
98.times { channel_1.add(Fabricate(:user)) }
channel_1.update!(user_count_stale: true)
# Jobs.run_immediately!
Jobs.run_immediately!
Jobs::UpdateChannelUserCount.new.execute(chat_channel_id: channel_1.id)
end

View File

@ -9,7 +9,7 @@ RSpec.describe "JIT messages", type: :system, js: true do
let(:channel) { PageObjects::Pages::ChatChannel.new }
before do
# Jobs.run_immediately!
Jobs.run_immediately!
channel_1.add(current_user)
chat_system_bootstrap
sign_in(current_user)

View File

@ -48,7 +48,7 @@ RSpec.describe "Message notifications - mobile", type: :system, js: true, mobile
context "when user is in DnD" do
before do
# Jobs.run_immediately!
Jobs.run_immediately!
Fabricate(
:do_not_disturb_timing,
user: current_user,

View File

@ -46,7 +46,7 @@ RSpec.describe "Message notifications - with sidebar", type: :system, js: true d
context "when user is in DnD" do
before do
# Jobs.run_immediately!
Jobs.run_immediately!
Fabricate(
:do_not_disturb_timing,
user: current_user,
@ -89,7 +89,7 @@ RSpec.describe "Message notifications - with sidebar", type: :system, js: true d
end
context "when a message with mentions is created" do
# before { Jobs.run_immediately! }
before { Jobs.run_immediately! }
it "correctly renders notifications" do
visit("/")

View File

@ -39,7 +39,7 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
context "when dm channel" do
fab!(:dm_channel_1) { Fabricate(:direct_message_channel, users: [current_user, other_user]) }
# before { Jobs.run_immediately! }
before { Jobs.run_immediately! }
context "when @username" do
it "shows a mention notification" do
@ -71,7 +71,7 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
before do
channel_1.add(current_user)
channel_1.add(other_user)
# Jobs.run_immediately!
Jobs.run_immediately!
end
context "when group mention" do
@ -163,7 +163,7 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
fab!(:other_user) { Fabricate(:user) }
before do
# Jobs.run_immediately!
Jobs.run_immediately!
channel_1.add(current_user)
end

View File

@ -13,7 +13,7 @@ RSpec.describe "User status | sidebar", type: :system, js: true do
chat_system_bootstrap
current_user.set_status!("online", "heart")
sign_in(current_user)
# Jobs.run_immediately!
Jobs.run_immediately!
end
it "shows user status" do