discourse/plugins/chat/spec/system/page_objects/sidebar/sidebar.rb
Joffrey JAFFEUX 66130dc8c1
REFACTOR: handles every chat resource as an URL (#18961)
- Note this is also tweaking the UI a little bit as we are now using links/buttons in the header as needed
- It disables the find ideal channel in drawer mode, if loading `/chat` in drawer mode it will either reopen at the last position or just stay on index
2022-11-11 06:39:15 +01:00

20 lines
534 B
Ruby

# frozen_string_literal: true
module PageObjects
module Pages
class Sidebar < PageObjects::Pages::Base
def open_draft_channel
find(".sidebar-section-chat-dms .sidebar-section-header-button", visible: false).click
end
def open_browse
find(".sidebar-section-chat-channels .sidebar-section-header-button", visible: false).click
end
def open_channel(channel)
find(".sidebar-section-link[href='/chat/channel/#{channel.id}/#{channel.slug}']").click
end
end
end
end