mirror of
https://github.com/discourse/discourse.git
synced 2024-12-16 13:13:44 +08:00
d75d64bf16
This commit replaces two existing screens: - draft - channel selection modal Main features compared to existing solutions - features are now combined, meaning you can for example create multi users DM - it will show users with chat disabled - it shows unread state - hopefully a better look/feel - lots of small details and fixes... Other noticeable fixes - starting a DM with a user, even from the user card and clicking <kbd>Chat</kbd> will not show a green dot for the target user (or even the channel) until a message is actually sent - it should almost never do a full page reload anymore --------- Co-authored-by: Martin Brennan <mjrbrennan@gmail.com> Co-authored-by: Jordan Vidrine <30537603+jordanvidrine@users.noreply.github.com> Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com> Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
32 lines
787 B
Ruby
32 lines
787 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Pages
|
|
class Sidebar < PageObjects::Pages::Base
|
|
def channels_section
|
|
find(".sidebar-section[data-section-name='chat-channels']")
|
|
end
|
|
|
|
def dms_section
|
|
find(".sidebar-section[data-section-name='chat-dms']")
|
|
end
|
|
|
|
def open_browse
|
|
find(
|
|
".sidebar-section[data-section-name='chat-channels'] .sidebar-section-header-button",
|
|
visible: false,
|
|
).click
|
|
end
|
|
|
|
def open_channel(channel)
|
|
find(".sidebar-section-link[href='/chat/c/#{channel.slug}/#{channel.id}']").click
|
|
end
|
|
|
|
def find_channel(channel)
|
|
find(".sidebar-section-link[href='/chat/c/#{channel.slug}/#{channel.id}']")
|
|
self
|
|
end
|
|
end
|
|
end
|
|
end
|