mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-08 04:15:18 +08:00
Follow up to https://github.com/discourse/discourse/pull/33253 Switches to the generic `d-table` class instead of using the admin stylesheet. No visual changes, except the badge/status for the API key. | Before | After | |--------|--------| |  |  |
34 lines
691 B
Ruby
34 lines
691 B
Ruby
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Pages
|
|
class AdminEmojis < AdminBase
|
|
def visit_page
|
|
page.visit "/admin/config/emoji"
|
|
self
|
|
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-table__row", text: name).find(delete_button_selector).click
|
|
end
|
|
|
|
private
|
|
|
|
def emoji_table_selector
|
|
"#custom_emoji"
|
|
end
|
|
|
|
def delete_button_selector
|
|
".d-table__cell-action-delete"
|
|
end
|
|
end
|
|
end
|
|
end
|