Skip to content

A platform for community discussion. Free, open, simple.

DEV: Skip all chat specs with Jobs.run_immediately! (#19684)

Martin Brennanb57f9c73a4b8
diff --git a/plugins/chat/spec/system/archive_channel_spec.rb b/plugins/chat/spec/system/archive_channel_spec.rb
index 3a180757e6f..fdd32e3f51c 100644
--- a/plugins/chat/spec/system/archive_channel_spec.rb
+++ b/plugins/chat/spec/system/archive_channel_spec.rb
@@ -53,9 +53,9 @@ 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
+ xit "works" do
chat.visit_channel_settings(channel_1)
click_button(I18n.t("js.chat.channel_settings.archive_channel"))
find("#split-topic-name").fill_in(with: "An interesting topic for cats")
@@ -77,7 +77,7 @@ RSpec.describe "Archive channel", type: :system, js: true do
)
end
- it "clears unread indicators" do
+ xit "clears unread indicators" do
visit("/")
expect(page.find(".chat-channel-unread-indicator")).to have_content(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
@@ -108,7 +108,7 @@ RSpec.describe "Archive channel", type: :system, js: true do
)
end
- it "can be retried" do
+ xit "can be retried" do
chat.visit_channel(channel_1)
click_button(I18n.t("js.chat.channel_archive.retry"))
diff --git a/plugins/chat/spec/system/channel_members_page_spec.rb b/plugins/chat/spec/system/channel_members_page_spec.rb
index 166c45612c6..d10026fb4eb 100644
--- a/plugins/chat/spec/system/channel_members_page_spec.rb
+++ b/plugins/chat/spec/system/channel_members_page_spec.rb
@@ -39,11 +39,11 @@ 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
- it "shows all members" do
+ xit "shows all members" do
chat_page.visit_channel_members(channel_1)
expect(page).to have_selector(".channel-members-view__list-item", count: 50)
@@ -58,7 +58,7 @@ RSpec.describe "Channel - Info - Members page", type: :system, js: true do
end
context "with filter" do
- it "filters members" do
+ xit "filters members" do
chat_page.visit_channel_members(channel_1)
find(".channel-members-view__search-input").fill_in(with: "cat")
diff --git a/plugins/chat/spec/system/jit_messages_spec.rb b/plugins/chat/spec/system/jit_messages_spec.rb
index 8cd9fad03e6..5eff1768bc3 100644
--- a/plugins/chat/spec/system/jit_messages_spec.rb
+++ b/plugins/chat/spec/system/jit_messages_spec.rb
@@ -36,7 +36,7 @@ RSpec.describe "JIT messages", type: :system, js: true do
private_channel_1.add(current_user)
end
- it "displays a mention warning" do
+ xit "displays a mention warning" do
Jobs.run_immediately!
chat.visit_channel(private_channel_1)
@@ -52,7 +52,7 @@ RSpec.describe "JIT messages", type: :system, js: true do
context "when group can't be mentioned" do
fab!(:group_1) { Fabricate(:group, mentionable_level: Group::ALIAS_LEVELS[:nobody]) }
- it "displays a mention warning" do
+ xit "displays a mention warning" do
Jobs.run_immediately!
chat.visit_channel(channel_1)
diff --git a/plugins/chat/spec/system/message_notifications_mobile_spec.rb b/plugins/chat/spec/system/message_notifications_mobile_spec.rb
index 40a099e25c0..fb5f1437be9 100644
--- a/plugins/chat/spec/system/message_notifications_mobile_spec.rb
+++ b/plugins/chat/spec/system/message_notifications_mobile_spec.rb
@@ -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,
@@ -57,7 +57,7 @@ RSpec.describe "Message notifications - mobile", type: :system, js: true, mobile
)
end
- it "doesn’t show indicator in header" do
+ xit "doesn’t show indicator in header" do
visit("/chat")
using_session(:user_1) { create_message(channel: channel_1, creator: user_1) }
@@ -70,7 +70,7 @@ RSpec.describe "Message notifications - mobile", type: :system, js: true, mobile
before { channel_1.membership_for(current_user).update!(muted: true) }
context "when a message is created" do
- it "doesn't show anything" do
+ xit "doesn't show anything" do
visit("/chat")
using_session(:user_1) { create_message(channel: channel_1, creator: user_1) }
diff --git a/plugins/chat/spec/system/message_notifications_with_sidebar_spec.rb b/plugins/chat/spec/system/message_notifications_with_sidebar_spec.rb
index 380a3310339..14155c5d935 100644
--- a/plugins/chat/spec/system/message_notifications_with_sidebar_spec.rb
+++ b/plugins/chat/spec/system/message_notifications_with_sidebar_spec.rb
@@ -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,
@@ -55,7 +55,7 @@ RSpec.describe "Message notifications - with sidebar", type: :system, js: true d
)
end
- it "doesn’t show indicator in header" do
+ xit "doesn’t show indicator in header" do
visit("/")
using_session(:user_1) { create_message(channel: channel_1, creator: user_1) }
@@ -89,9 +89,9 @@ 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
+ xit "correctly renders notifications" do
visit("/")
using_session(:user_1) do
create_message(
diff --git a/plugins/chat/spec/system/user_menu_notifications/sidebar_spec.rb b/plugins/chat/spec/system/user_menu_notifications/sidebar_spec.rb
index bde5ad1a8af..edfae85e0e0 100644
--- a/plugins/chat/spec/system/user_menu_notifications/sidebar_spec.rb
+++ b/plugins/chat/spec/system/user_menu_notifications/sidebar_spec.rb
@@ -39,10 +39,10 @@ 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
+ xit "shows a mention notification" do
message =
Chat::ChatMessageCreator.create(
chat_channel: dm_channel_1,
@@ -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
@@ -79,7 +79,7 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
before { group.add(current_user) }
- it "shows a group mention notification" do
+ xit "shows a group mention notification" do
message =
Chat::ChatMessageCreator.create(
chat_channel: channel_1,
@@ -106,7 +106,7 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
end
context "when @username" do
- it "shows a mention notification" do
+ xit "shows a mention notification" do
message =
Chat::ChatMessageCreator.create(
chat_channel: channel_1,
@@ -130,7 +130,7 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
end
context "when @all" do
- it "shows a mention notification" do
+ xit "shows a mention notification" do
message =
Chat::ChatMessageCreator.create(
chat_channel: channel_1,
@@ -164,7 +164,7 @@ RSpec.describe "User menu notifications | sidebar", type: :system, js: true do
before { channel_1.add(current_user) }
- it "shows an invitation notification" do
+ xit "shows an invitation notification" do
Jobs.run_immediately!
chat.visit_channel(channel_1)
diff --git a/plugins/chat/spec/system/user_status/sidebar_spec.rb b/plugins/chat/spec/system/user_status/sidebar_spec.rb
index e29a3d19b81..d49688dc790 100644
--- a/plugins/chat/spec/system/user_status/sidebar_spec.rb
+++ b/plugins/chat/spec/system/user_status/sidebar_spec.rb
@@ -13,10 +13,10 @@ 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
+ xit "shows user status" do
visit("/")
expect(find(".user-status .emoji")["title"]).to eq("online")
@@ -24,7 +24,7 @@ RSpec.describe "User status | sidebar", type: :system, js: true do
end
context "when changing status" do
- it "updates status" do
+ xit "updates status" do
visit("/")
current_user.set_status!("offline", "tooth")
@@ -34,7 +34,7 @@ RSpec.describe "User status | sidebar", type: :system, js: true do
end
context "when removing status" do
- it "removes status" do
+ xit "removes status" do
visit("/")
current_user.clear_status!