From a3c1fff65a1ce69b92aafd16b69d8cdfd696beaa Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Wed, 24 Jan 2024 18:56:50 +0100 Subject: [PATCH] DEV: removes flakey spec (#25405) scroll position is not reliable enough --- plugins/chat/spec/system/chat_channel_spec.rb | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/plugins/chat/spec/system/chat_channel_spec.rb b/plugins/chat/spec/system/chat_channel_spec.rb index 37b7d66406e..3983a90c1ff 100644 --- a/plugins/chat/spec/system/chat_channel_spec.rb +++ b/plugins/chat/spec/system/chat_channel_spec.rb @@ -358,30 +358,4 @@ RSpec.describe "Chat channel", type: :system do ) end end - - context "when navigating from one channel to another" do - fab!(:channel_2) { Fabricate(:chat_channel) } - - before do - channel_2.add(current_user) - Fabricate.times(50, :chat_message, chat_channel: channel_1) - end - - it "remembers the scroll position" do - chat_page.visit_channel(channel_1, message_id: channel_1.chat_messages[2].id) - - expect(channel_page).to have_css(".chat-channel--saved-scroll-position") - - sidebar_page.open_channel(channel_2) - sidebar_page.open_channel(channel_1) - - expect(channel_page.messages).to have_no_message(id: channel_1.chat_messages[49].id) - - find(".chat-scroll-to-bottom__button.visible").click - sidebar_page.open_channel(channel_2) - sidebar_page.open_channel(channel_1) - - expect(channel_page.messages).to have_message(id: channel_1.chat_messages[49].id) - end - end end