mirror of
https://github.com/discourse/discourse.git
synced 2024-12-24 01:53:46 +08:00
15a61a0c1f
The Admin UI guidelines states that buttons should have text, not icons. This was an oversight on the admin emoji listing. Part of this change is also opportunistically removing the CSS file for admin emojis, none of which is used any more since the conversion.
44 lines
942 B
Ruby
44 lines
942 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Pages
|
|
class AdminEmojis < PageObjects::Pages::Base
|
|
def visit_page
|
|
page.visit "/admin/customize/emojis"
|
|
self
|
|
end
|
|
|
|
def click_tab(tab_name)
|
|
case tab_name
|
|
when "settings"
|
|
find(".admin-emojis-tabs__settings").click
|
|
when "index"
|
|
find(".admin-emojis-tabs__emoji").click
|
|
end
|
|
end
|
|
|
|
def has_emoji_listed?(name)
|
|
page.has_css?(emoji_table_selector, text: name)
|
|
end
|
|
|
|
def has_no_emoji_listed?(name)
|
|
page.has_no_css?(emoji_table_selector, text: name)
|
|
end
|
|
|
|
def delete_emoji(name)
|
|
find(".d-admin-row__content", text: name).find(delete_button_selector).click
|
|
end
|
|
|
|
private
|
|
|
|
def emoji_table_selector
|
|
"#custom_emoji"
|
|
end
|
|
|
|
def delete_button_selector
|
|
".d-admin-row__controls-delete"
|
|
end
|
|
end
|
|
end
|
|
end
|