FIX: ensures activeMessage is reset with channel (#21031)

This commit is contained in:
Joffrey JAFFEUX
2023-04-10 08:10:01 +02:00
committed by GitHub
parent c7b49a14c7
commit c1dc6a2db4
3 changed files with 32 additions and 3 deletions

View File

@@ -68,6 +68,25 @@ RSpec.describe "Drawer", type: :system, js: true do
end
end
context "when closing the drawer" do
fab!(:channel_1) { Fabricate(:chat_channel) }
fab!(:message_1) { Fabricate(:chat_message, chat_channel: channel_1) }
before { channel_1.add(current_user) }
it "resets the active message" do
visit("/")
chat_page.open_from_header
drawer.open_channel(channel_1)
channel_page.hover_message(message_1)
expect(page).to have_css(".chat-message-actions-container")
find(".chat-composer-input").send_keys(:escape)
expect(page).to have_no_css(".chat-message-actions-container")
end
end
context "when clicking the drawer's header" do
it "collapses the drawer" do
visit("/")