mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 22:23:38 +08:00
189d98f3ca
This PR converts the custom emoji UI in the admin pages to follow the new admin UI guidelines.
34 lines
908 B
Ruby
34 lines
908 B
Ruby
#frozen_string_literal: true
|
|
|
|
describe "Admin Customize Emoji Page", type: :system do
|
|
fab!(:current_user) { Fabricate(:admin) }
|
|
|
|
let(:emojis_page) { PageObjects::Pages::AdminEmojis.new }
|
|
let(:dialog) { PageObjects::Components::Dialog.new }
|
|
let(:settings_page) { PageObjects::Pages::AdminSiteSettings.new }
|
|
|
|
before do
|
|
Fabricate(:custom_emoji)
|
|
|
|
sign_in(current_user)
|
|
end
|
|
|
|
it "shows a list of custom emojis" do
|
|
emojis_page.visit_page
|
|
expect(emojis_page).to have_emoji_listed("joffrey_facepalm")
|
|
end
|
|
|
|
it "can delete a custom emoji" do
|
|
emojis_page.visit_page
|
|
emojis_page.delete_emoji("joffrey_facepalm")
|
|
dialog.click_yes
|
|
expect(emojis_page).to have_no_emoji_listed("joffrey_facepalm")
|
|
end
|
|
|
|
it "can see emoji site settings" do
|
|
emojis_page.visit_page
|
|
emojis_page.click_tab("settings")
|
|
expect(settings_page).to have_setting("enable_emoji")
|
|
end
|
|
end
|