diff --git a/plugins/chat/spec/system/update_last_read_spec.rb b/plugins/chat/spec/system/update_last_read_spec.rb index b190ae73de6..d405d92f550 100644 --- a/plugins/chat/spec/system/update_last_read_spec.rb +++ b/plugins/chat/spec/system/update_last_read_spec.rb @@ -23,6 +23,7 @@ RSpec.describe "Update last read", type: :system do chat_page.visit_channel(channel_1) try_until_success do + page.execute_script("document.querySelector('.chat-messages-scroll').scrollTo(0, 1)") page.execute_script("document.querySelector('.chat-messages-scroll').scrollTo(0, 0)") expect(membership.reload.last_read_message_id).to eq(last_message.id) end