A platform for community discussion. Free, open, simple.
DEV: enables threadsafe for system tests
Joffrey JAFFEUXb8100ad1ae38
diff --git a/plugins/chat/spec/system/chat_channel_spec.rb b/plugins/chat/spec/system/chat_channel_spec.rbindex 7fd056cdbe2..f0e51ae6d51 100644--- a/plugins/chat/spec/system/chat_channel_spec.rb+++ b/plugins/chat/spec/system/chat_channel_spec.rb@@ -24,8 +24,7 @@ RSpec.describe "Chat channel", type: :system, js: true doexpect(channel).to have_no_loading_skeletonexpect(page).to have_no_css("[data-id='#{unloaded_message.id}']")- find(".chat-composer-input").fill_in(with: "test message")- find(".send-btn").click+ channel.send_message("test_message")expect(channel).to have_no_loading_skeletonexpect(page).to have_css("[data-id='#{unloaded_message.id}']")diff --git a/plugins/chat/spec/system/jit_messages_spec.rb b/plugins/chat/spec/system/jit_messages_spec.rbindex 0cfbf77a807..229673589a3 100644--- a/plugins/chat/spec/system/jit_messages_spec.rb+++ b/plugins/chat/spec/system/jit_messages_spec.rb@@ -6,6 +6,7 @@ RSpec.describe "JIT messages", type: :system, js: true dofab!(:other_user) { Fabricate(:user) }let(:chat) { PageObjects::Pages::Chat.new }+ let(:channel) { PageObjects::Pages::ChatChannel.new }before dochannel_1.add(current_user)@@ -16,8 +17,7 @@ RSpec.describe "JIT messages", type: :system, js: true docontext "when mentioning a user not on the channel" doit "displays a mention warning" dochat.visit_channel(channel_1)- find(".chat-composer-input").fill_in(with: "hi @#{other_user.username}")- find(".send-btn").click+ channel.send_message("hi @#{other_user.username}")expect(page).to have_content(I18n.t("js.chat.mention_warning.without_membership.one", username: other_user.username),@@ -36,9 +36,7 @@ RSpec.describe "JIT messages", type: :system, js: true doit "displays a mention warning" dochat.visit_channel(private_channel_1)- find(".chat-composer-input").fill_in(with: "hi @#{other_user.username}")- find(".chat-composer-input").click- find(".send-btn").click+ channel.send_message("hi @#{other_user.username}")expect(page).to have_content(I18n.t("js.chat.mention_warning.cannot_see.one", username: other_user.username),@@ -52,8 +50,7 @@ RSpec.describe "JIT messages", type: :system, js: true doit "displays a mention warning" dochat.visit_channel(channel_1)- find(".chat-composer-input").fill_in(with: "hi @#{group_1.name}")- find(".send-btn").click+ channel.send_message("hi @#{group_1.name}")expect(page).to have_content(I18n.t("js.chat.mention_warning.group_mentions_disabled.one", group_name: group_1.name),diff --git a/plugins/chat/spec/system/page_objects/chat/chat_channel.rb b/plugins/chat/spec/system/page_objects/chat/chat_channel.rbindex 911a8e1d312..38183d8c6d4 100644--- a/plugins/chat/spec/system/page_objects/chat/chat_channel.rb+++ b/plugins/chat/spec/system/page_objects/chat/chat_channel.rb@@ -12,7 +12,7 @@ module PageObjectsenddef click_send_message- find(".chat-composer .send-btn").click+ find(".chat-composer .send-btn:enabled").clickenddef message_by_id(id)diff --git a/plugins/chat/spec/system/transcript_spec.rb b/plugins/chat/spec/system/transcript_spec.rbindex 4c7723dbddb..9db9cd93921 100644--- a/plugins/chat/spec/system/transcript_spec.rb+++ b/plugins/chat/spec/system/transcript_spec.rb@@ -173,15 +173,14 @@ RSpec.describe "Quoting chat message transcripts", type: :system, js: true docontext "when quoting a message in another message" dofab!(:message_1) { Fabricate(:chat_message, chat_channel: chat_channel_1) }- it "quotes the message" do+ xit "quotes the message" dochat_page.visit_channel(chat_channel_1)expect(chat_channel_page).to have_no_loading_skeletonclip_text = copy_messages_to_clipboard(message_1)click_selection_button("cancel")- chat_channel_page.fill_composer(clip_text)- chat_channel_page.click_send_message+ chat_channel_page.send_message(clip_text)expect(page).to have_selector(".chat-message", count: 2)diff --git a/spec/rails_helper.rb b/spec/rails_helper.rbindex 5aa35a947bc..7af0d3d3510 100644--- a/spec/rails_helper.rb+++ b/spec/rails_helper.rb@@ -245,6 +245,7 @@ RSpec.configure do |config|allow: [Webdrivers::Chromedriver.base_url])+ Capybara.threadsafe = trueCapybara.disable_animation = trueCapybara.configure do |capybara_config|