mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 22:37:37 +08:00
FEATURE: Add new don't feed the trolls feature (#21001)
Responding to negative behaviour tends to solicit more of the same. Common wisdom states: "don't feed the trolls". This change codifies that advice by introducing a new nudge when hitting the reply button on a flagged post. It will be shown if either the current user, or two other users (configurable via a site setting) have flagged the post.
This commit is contained in:
@ -43,6 +43,10 @@ module PageObjects
|
||||
composer_input.value == content
|
||||
end
|
||||
|
||||
def has_popup_content?(content)
|
||||
composer_popup.has_content?(content)
|
||||
end
|
||||
|
||||
def select_action(action)
|
||||
find(action(action)).click
|
||||
self
|
||||
@ -83,6 +87,10 @@ module PageObjects
|
||||
def composer_input
|
||||
find("#{COMPOSER_ID} .d-editor .d-editor-input")
|
||||
end
|
||||
|
||||
def composer_popup
|
||||
find("#{COMPOSER_ID} .composer-popup")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user