mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 21:25:24 +08:00
FIX: correctly handles navigating to a message (#19614)
Recent changes surfaced the various issues with this codepath: - we were not correctly reseting `messageLookup` leading to us trying to scroll to a non existing message in the view - we were calling markAsRead which would scroll to the bottom, even if we had a target message - we were not debouncing fetchMessages, which could cause multiple reload of the messages when loading it with a targetMessageId: first fetch from last read and then immediately fetch from targetMessageId - other naming inconsistencies - not handling drawer This commit also adds tests for classic scenarios related to this use case.
This commit is contained in:
@ -3,6 +3,10 @@
|
||||
module PageObjects
|
||||
module Pages
|
||||
class Chat < PageObjects::Pages::Base
|
||||
def prefers_full_page
|
||||
page.execute_script("window.localStorage.setItem('discourse_chat_preferred_mode', '\"FULL_PAGE_CHAT\"');")
|
||||
end
|
||||
|
||||
def open_from_header
|
||||
find(".chat-header-icon").click
|
||||
end
|
||||
|
Reference in New Issue
Block a user