mirror of
https://github.com/discourse/discourse.git
synced 2024-12-17 11:53:57 +08:00
d07b472b79
* DEV: Rnemae channel path to just c Also swap the channel id and channel slug params to be consistent with core. * linting * channel_path * params in wrong order * Drop slugify helper and channel route without slug * Request slug and route models through the channel model if possible * Add client side redirection for backwards-compatibility Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
33 lines
828 B
Ruby
33 lines
828 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Pages
|
|
class Sidebar < PageObjects::Pages::Base
|
|
def channels_section
|
|
find(".sidebar-section-chat-channels")
|
|
end
|
|
|
|
def dms_section
|
|
find(".sidebar-section-chat-dms")
|
|
end
|
|
|
|
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/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
|