mirror of
https://github.com/discourse/discourse.git
synced 2024-12-18 16:43:57 +08:00
720cf24659
When hovering the chat message actions we are technically not hovering the message anymore, which was removing the background and is slightly unexpected. This commit ensures we keep this background until closing the message actions.
27 lines
730 B
Ruby
27 lines
730 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.describe "Chat message", type: :system, js: true do
|
|
fab!(:current_user) { Fabricate(:user) }
|
|
fab!(:channel_1) { Fabricate(:chat_channel) }
|
|
fab!(:message_1) { Fabricate(:chat_message, chat_channel: channel_1) }
|
|
|
|
let(:chat) { PageObjects::Pages::Chat.new }
|
|
let(:channel) { PageObjects::Pages::ChatChannel.new }
|
|
|
|
before { chat_system_bootstrap }
|
|
|
|
context "when hovering a message" do
|
|
before do
|
|
channel_1.add(current_user)
|
|
sign_in(current_user)
|
|
end
|
|
|
|
it "adds an active class" do
|
|
chat.visit_channel(channel_1)
|
|
channel.hover_message(message_1)
|
|
|
|
expect(page).to have_css("[data-id='#{message_1.id}'] .chat-message.is-active")
|
|
end
|
|
end
|
|
end
|