mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
UX: flag settings tab to follow UI guidelines (#28479)
Add settings tab to flags moderation page.
This commit is contained in:

committed by
GitHub

parent
417ade98f9
commit
df6c152fa1
@ -8,6 +8,7 @@ describe "Admin Flags Page", type: :system do
|
||||
let(:admin_flags_page) { PageObjects::Pages::AdminFlags.new }
|
||||
let(:admin_flag_form_page) { PageObjects::Pages::AdminFlagForm.new }
|
||||
let(:flag_modal) { PageObjects::Modals::Flag.new }
|
||||
let(:admin_header) { PageObjects::Components::AdminHeader.new }
|
||||
|
||||
before do
|
||||
sign_in(admin)
|
||||
@ -147,6 +148,30 @@ describe "Admin Flags Page", type: :system do
|
||||
)
|
||||
end
|
||||
|
||||
it "has settings tab" do
|
||||
admin_flags_page.visit
|
||||
|
||||
expect(admin_header).to have_tabs(
|
||||
[I18n.t("admin_js.settings"), I18n.t("admin_js.admin.config_areas.flags.flags_tab")],
|
||||
)
|
||||
|
||||
admin_flags_page.click_settings_tab
|
||||
expect(page.all(".setting-label h3").map(&:text)).to eq(
|
||||
[
|
||||
"silence new user sensitivity",
|
||||
"num users to silence new user",
|
||||
"max flags per day",
|
||||
"tl2 additional flags per day multiplier",
|
||||
"tl3 additional flags per day multiplier",
|
||||
"tl4 additional flags per day multiplier",
|
||||
"flag sockpuppets",
|
||||
"auto respond to flag actions",
|
||||
"num flaggers to close topic",
|
||||
"high trust flaggers auto hide posts",
|
||||
],
|
||||
)
|
||||
end
|
||||
|
||||
it "does not allow to move notify user flag" do
|
||||
admin_flags_page.visit
|
||||
expect(admin_flags_page).to have_no_action_for_flag("notify_user")
|
||||
|
Reference in New Issue
Block a user