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:
Blake Erickson
2024-04-05 14:56:52 -06:00
committed by GitHub
parent 570e3f7a1a
commit 8da49b5664
7 changed files with 65 additions and 2 deletions
@@ -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
+19
View File
@@ -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")