DEV: removes flakey spec (#25405)

scroll position is not reliable enough
This commit is contained in:
Joffrey JAFFEUX 2024-01-24 18:56:50 +01:00 committed by GitHub
parent 9130a3cafd
commit a3c1fff65a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 26 deletions

View File

@ -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