From c970cbeac429ea0e444871e9e1e11ec2d57d6403 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Mon, 9 Oct 2023 09:30:18 +0200 Subject: [PATCH] DEV: ensures thread panel has been opened (#23836) I don't have a repro of this ATM, but I suspect that ensuring the panel has been opened before moving to next tests could make this test more resilient. --- plugins/chat/spec/system/reply_to_message/smoke_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/chat/spec/system/reply_to_message/smoke_spec.rb b/plugins/chat/spec/system/reply_to_message/smoke_spec.rb index e5a3b184b02..bb0a5407401 100644 --- a/plugins/chat/spec/system/reply_to_message/smoke_spec.rb +++ b/plugins/chat/spec/system/reply_to_message/smoke_spec.rb @@ -4,6 +4,7 @@ RSpec.describe "Reply to message - smoke", type: :system do let(:chat_page) { PageObjects::Pages::Chat.new } let(:channel_page) { PageObjects::Pages::ChatChannel.new } let(:thread_page) { PageObjects::Pages::ChatThread.new } + let(:side_panel) { PageObjects::Pages::ChatSidePanel.new } fab!(:user_1) { Fabricate(:user) } fab!(:user_2) { Fabricate(:user) } @@ -29,6 +30,7 @@ RSpec.describe "Reply to message - smoke", type: :system do sign_in(user_2) chat_page.visit_channel(channel_1) channel_page.reply_to(original_message) + expect(side_panel).to have_open_thread(original_message.thread) end using_session(:user_1) do @@ -36,7 +38,6 @@ RSpec.describe "Reply to message - smoke", type: :system do thread_page.click_send_message expect(channel_page.message_thread_indicator(original_message)).to have_reply_count(1) - expect(thread_page.messages).to have_message(text: "user1reply") end