mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 19:39:30 +08:00
FIX: chat channel row indicator should only show urgent count (#25458)
Correctly shows the number of urgent notifications in channel list, rather than showing all new notifications as urgent.
This commit is contained in:
@ -104,6 +104,26 @@ RSpec.describe "Message notifications - mobile", type: :system, mobile: true do
|
||||
expect(page).to have_css(".chat-header-icon .chat-channel-unread-indicator")
|
||||
expect(channel_index_page).to have_unread_channel(channel_1, count: 1)
|
||||
end
|
||||
|
||||
it "shows correct count when there are multiple messages but only 1 is urgent" do
|
||||
Jobs.run_immediately!
|
||||
|
||||
visit("/chat/channels")
|
||||
|
||||
create_message(
|
||||
channel_1,
|
||||
user: user_1,
|
||||
text: "Are you busy @#{current_user.username}?",
|
||||
)
|
||||
|
||||
3.times { create_message(channel_1, user: user_1) }
|
||||
|
||||
expect(page).to have_css(
|
||||
".chat-header-icon .chat-channel-unread-indicator",
|
||||
text: "1",
|
||||
)
|
||||
expect(channel_index_page).to have_unread_channel(channel_1, count: 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user