From e5ec0b84a9d0fe43f4bd126dec9e3cf5128c610c Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Thu, 27 Apr 2023 09:43:26 +0200 Subject: [PATCH] DEV: fix a spec and skips another one (#21277) - It seems that `window_opened_by/within_window` it not reliable in our current setup/test - System specs should avoid at all cost to rely on backend state, any change should be visible one way or another on the front to be properly tested --- plugins/chat/spec/system/archive_channel_spec.rb | 2 +- plugins/chat/spec/system/transcript_spec.rb | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/plugins/chat/spec/system/archive_channel_spec.rb b/plugins/chat/spec/system/archive_channel_spec.rb index ca98e30b678..292a0595e6d 100644 --- a/plugins/chat/spec/system/archive_channel_spec.rb +++ b/plugins/chat/spec/system/archive_channel_spec.rb @@ -118,7 +118,7 @@ RSpec.describe "Archive channel", type: :system, js: true do ) end - it "can be retried" do + xit "can be retried" do Jobs.run_immediately! chat.visit_channel(channel_1) diff --git a/plugins/chat/spec/system/transcript_spec.rb b/plugins/chat/spec/system/transcript_spec.rb index 953f570f4ac..9c116ae7a59 100644 --- a/plugins/chat/spec/system/transcript_spec.rb +++ b/plugins/chat/spec/system/transcript_spec.rb @@ -143,12 +143,7 @@ RSpec.describe "Quoting chat message transcripts", type: :system, js: true do chat_channel_page.send_message(clip_text) expect(page).to have_selector(".chat-message", count: 2) - - message = Chat::Message.find_by(user: current_user, message: clip_text.chomp) - - within(chat_channel_page.message_by_id(message.id)) do - expect(page).to have_css(".chat-transcript") - end + expect(page).to have_css(".chat-transcript") end end end