mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: display process information on flag modal (#31300)
Information about the process is displayed on top of the flag modal. In addition `allow_tl0_and_anonymous_users_to_flag_illegal_content` site setting was renamed to `allow_all_users_to_flag_illegal_content` as it is more descriptive. <img width="629" alt="Screenshot 2025-02-12 at 3 58 12 pm" src="https://github.com/user-attachments/assets/67c74ebc-6771-490d-b2c4-cbec25db8128" /> <img width="642" alt="Screenshot 2025-02-12 at 3 58 04 pm" src="https://github.com/user-attachments/assets/5e4b8c84-601a-40c2-812f-b73d2b88a549" />
This commit is contained in:
committed by
GitHub
parent
fa8945fee2
commit
2763e1726e
@@ -164,7 +164,7 @@ describe "Admin Flags Page", type: :system do
|
||||
admin_flags_page.click_tab("settings")
|
||||
expect(page.all(".setting-label h3").map(&:text).map(&:downcase)).to eq(
|
||||
[
|
||||
"allow tl0 and anonymous users to flag illegal content",
|
||||
"allow all users to flag illegal content",
|
||||
"email address to report illegal content",
|
||||
"silence new user sensitivity",
|
||||
"num users to silence new user",
|
||||
|
||||
@@ -65,10 +65,13 @@ describe "Flagging post", type: :system do
|
||||
expect(topic_page).to have_no_flag_button
|
||||
end
|
||||
|
||||
it "allows to mark posts as illegal when allow_tl0_and_anonymous_users_to_flag_illegal_content setting is enabled" do
|
||||
it "allows to mark posts as illegal when allow_all_users_to_flag_illegal_content setting is enabled" do
|
||||
SiteSetting.email_address_to_report_illegal_content = "illegal@example.com"
|
||||
SiteSetting.allow_tl0_and_anonymous_users_to_flag_illegal_content = true
|
||||
SiteSetting.allow_all_users_to_flag_illegal_content = true
|
||||
topic_page.visit_topic(topic).open_flag_topic_modal
|
||||
expect(flag_modal.body).to have_content(
|
||||
ActionView::Base.full_sanitizer.sanitize(I18n.t("js.flagging.review_process_description")),
|
||||
)
|
||||
expect(flag_modal).to have_choices(I18n.t("js.flagging.formatted_name.illegal"))
|
||||
end
|
||||
end
|
||||
@@ -81,13 +84,16 @@ describe "Flagging post", type: :system do
|
||||
expect(topic_page).to have_no_post_more_actions(post_to_flag)
|
||||
end
|
||||
|
||||
it "allows to mark posts as illegal when allow_tl0_and_anonymous_users_to_flag_illegal_content setting is enabled" do
|
||||
it "allows to mark posts as illegal when allow_all_users_to_flag_illegal_content setting is enabled" do
|
||||
SiteSetting.contact_email = "contact@example.com"
|
||||
SiteSetting.allow_tl0_and_anonymous_users_to_flag_illegal_content = true
|
||||
SiteSetting.allow_all_users_to_flag_illegal_content = true
|
||||
|
||||
topic_page.visit_topic(topic, post_number: post_to_flag.post_number)
|
||||
topic_page.find_post_action_button(post_to_flag, :flag).click
|
||||
|
||||
expect(anonymous_flag_modal.body).to have_content(
|
||||
ActionView::Base.full_sanitizer.sanitize(I18n.t("js.flagging.review_process_description")),
|
||||
)
|
||||
expect(anonymous_flag_modal.body).to have_content(
|
||||
ActionView::Base.full_sanitizer.sanitize(
|
||||
I18n.t(
|
||||
|
||||
Reference in New Issue
Block a user