mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
FIX: correctly save scroll position in channel (#25345)
Due to an incorrect test the previous service was incorrectly implementing the map, and was most importantly not deleting the state when reaching bottom.
This commit is contained in:
@ -375,7 +375,13 @@ RSpec.describe "Chat channel", type: :system do
|
||||
sidebar_page.open_channel(channel_2)
|
||||
sidebar_page.open_channel(channel_1)
|
||||
|
||||
expect(channel_page.messages).to have_message(id: channel_1.chat_messages[2].id)
|
||||
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
|
||||
|
Reference in New Issue
Block a user