mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 23:24:41 +08:00
UX: user threads styling tweaks
This commit is contained in:
@ -5,13 +5,11 @@ module PageObjects
|
||||
class UserThreads < PageObjects::Pages::Base
|
||||
def has_threads?(count: nil)
|
||||
has_no_css?(".spinner")
|
||||
has_css?(".chat__user-threads__thread-container", count: count)
|
||||
has_css?(".c-user-thread", count: count)
|
||||
end
|
||||
|
||||
def open_thread(thread)
|
||||
find(
|
||||
".chat__user-threads__thread-container[data-id='#{thread.id}'] .chat__thread-title__name",
|
||||
).click
|
||||
find(".c-user-thread[data-id='#{thread.id}'] .chat__thread-title__name").click
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -38,19 +38,19 @@ module PageObjects
|
||||
end
|
||||
|
||||
def has_user_threads_section?
|
||||
has_css?(".chat__user-threads-row-container[href='/chat/threads']")
|
||||
has_css?(".chat-channel-row.--threads[href='/chat/threads']")
|
||||
end
|
||||
|
||||
def has_unread_user_threads?
|
||||
has_css?(".chat__user-threads-row .chat__unread-indicator")
|
||||
has_css?(".chat-channel-row.--threads .c-unread-indicator")
|
||||
end
|
||||
|
||||
def has_no_unread_user_threads?
|
||||
has_no_css?(".chat__user-threads-row .chat__unread-indicator")
|
||||
has_no_css?(".chat-channel-row.--threads .c-unread-indicator")
|
||||
end
|
||||
|
||||
def click_user_threads
|
||||
find(".chat__user-threads-row").click
|
||||
find(".chat-channel-row.--threads").click
|
||||
end
|
||||
|
||||
def maximize
|
||||
|
Reference in New Issue
Block a user