mirror of
https://github.com/discourse/discourse.git
synced 2026-08-11 13:35:20 -05:00
FEATURE: Add message to bulk close topics (#26535)
This will allow you to type a single message when bulk closing topics that will be applied to every topic, that way they all have the same message.
This commit is contained in:
@@ -50,6 +50,10 @@ module PageObjects
|
||||
find("#topic-bulk-action-options__silent").click
|
||||
end
|
||||
|
||||
def fill_in_close_note(message)
|
||||
find("#bulk-close-note").set(message)
|
||||
end
|
||||
|
||||
def click_dismiss_read_confirm
|
||||
find("#dismiss-read-confirm").click
|
||||
end
|
||||
|
||||
@@ -88,6 +88,25 @@ describe "Topic bulk select", type: :system do
|
||||
expect(topic_list).to have_no_unread_badge(topics.first)
|
||||
end
|
||||
|
||||
it "closes topics with message" do
|
||||
# Bulk close the topic with a message
|
||||
sign_in(admin)
|
||||
visit("/latest")
|
||||
topic = topics.first
|
||||
topic_list_header.click_bulk_select_button
|
||||
topic_list.click_topic_checkbox(topics.first)
|
||||
topic_list_header.click_bulk_select_topics_dropdown
|
||||
topic_list_header.click_close_topics_button
|
||||
|
||||
# Fill in message
|
||||
topic_list_header.fill_in_close_note("My message")
|
||||
topic_list_header.click_bulk_topics_confirm
|
||||
|
||||
# Check that the topic now has the message
|
||||
visit("/t/#{topic.slug}/#{topic.id}")
|
||||
expect(topic_page).to have_content("My message")
|
||||
end
|
||||
|
||||
it "works with keyboard shortcuts" do
|
||||
sign_in(admin)
|
||||
visit("/latest")
|
||||
|
||||
Reference in New Issue
Block a user