discourse/spec/system/admin_customize_emojis_spec.rb
Ted Johansson 189d98f3ca
DEV: Convert admin emojis UI to new layout ()
This PR converts the custom emoji UI in the admin pages to follow the new admin UI guidelines.
2024-11-11 15:04:15 +08:00

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