From e03121c55b263aa6fdd3b01fee587d3a08b23b68 Mon Sep 17 00:00:00 2001 From: Jarek Radosz Date: Mon, 16 Dec 2024 20:50:49 +0100 Subject: [PATCH] FIX: Correctly display group unread indicator in gjs (#30302) --- .../topic-list/unread-indicator.gjs | 6 +---- .../components/topic-list-item-test.gjs | 25 +++++++++++++++++++ 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/topic-list/unread-indicator.gjs b/app/assets/javascripts/discourse/app/components/topic-list/unread-indicator.gjs index adacb8611ab..79866942fc4 100644 --- a/app/assets/javascripts/discourse/app/components/topic-list/unread-indicator.gjs +++ b/app/assets/javascripts/discourse/app/components/topic-list/unread-indicator.gjs @@ -26,12 +26,8 @@ export default class UnreadIndicator extends Component { return `/private-messages/unread-indicator/${this.args.topic.id}`; } - get isUnread() { - return typeof this.args.topic.get("unread_by_group_member") !== "undefined"; - } - ); + + assert + .dom(".badge.badge-notification.unread-indicator") + .exists({ count: 1 }); + assert + .dom(".topic-list-item[data-topic-id='1235'] .unread-indicator") + .exists(); + }); });