mirror of
https://github.com/discourse/discourse.git
synced 2026-08-19 01:14:56 -05:00
DEV: Switch to data attributes to represent sidebar section name (#20771)
Data attributes are less restrictive than the class attribute.
This commit is contained in:
@@ -4,19 +4,25 @@ module PageObjects
|
||||
module Pages
|
||||
class Sidebar < PageObjects::Pages::Base
|
||||
def channels_section
|
||||
find(".sidebar-section-chat-channels")
|
||||
find(".sidebar-section[data-section-name='chat-channels']")
|
||||
end
|
||||
|
||||
def dms_section
|
||||
find(".sidebar-section-chat-dms")
|
||||
find(".sidebar-section[data-section-name='chat-dms']")
|
||||
end
|
||||
|
||||
def open_draft_channel
|
||||
find(".sidebar-section-chat-dms .sidebar-section-header-button", visible: false).click
|
||||
find(
|
||||
".sidebar-section[data-section-name='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
|
||||
find(
|
||||
".sidebar-section[data-section-name='chat-channels'] .sidebar-section-header-button",
|
||||
visible: false,
|
||||
).click
|
||||
end
|
||||
|
||||
def open_channel(channel)
|
||||
|
||||
Reference in New Issue
Block a user