discourse/spec/system/page_objects/pages/admin_emojis.rb
Ella E. b4a376bd9a
DEV: Use reusable d-table instead of admin-only styles (#33531)
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 |
|--------|--------|
|
![image](https://github.com/user-attachments/assets/e4d1a0ad-8e60-4ad8-b3b1-d17b66b878e8)
|
![image](https://github.com/user-attachments/assets/5bc41353-c4a0-486b-b730-451b9f737341)
|
2025-07-10 19:58:04 -06:00

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