mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
FIX: cancel editing should clear the composer (#21011)
This commit is contained in:
@ -72,6 +72,18 @@ RSpec.describe "Chat composer", type: :system, js: true do
|
||||
find(".chat-composer-input").send_keys(:escape)
|
||||
|
||||
expect(page).to have_no_selector(".chat-composer-message-details .chat-reply__username")
|
||||
expect(find(".chat-composer-input").value).to eq("")
|
||||
end
|
||||
end
|
||||
|
||||
context "when closing edited message" do
|
||||
it "cancels editing" do
|
||||
chat.visit_channel(channel_1)
|
||||
channel.edit_message(message_2)
|
||||
find(".cancel-message-action").click
|
||||
|
||||
expect(page).to have_no_selector(".chat-composer-message-details .chat-reply__username")
|
||||
expect(find(".chat-composer-input").value).to eq("")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user