mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
left_sidebar: Add unread markers to channel section headers.
This commit is contained in:
@@ -105,6 +105,7 @@ run_test("update_count_in_dom", () => {
|
||||
mentioned_message_count: 222,
|
||||
home_unread_messages: 333,
|
||||
stream_unread_messages: 666,
|
||||
stream_count: new Map(),
|
||||
};
|
||||
|
||||
$(".selected-home-view").set_find_results(".sidebar-menu-icon", $("<menu-icon>"));
|
||||
@@ -122,6 +123,9 @@ run_test("update_count_in_dom", () => {
|
||||
make_elem($(".top_left_reminders"), "<reminders-count>");
|
||||
|
||||
make_elem($("#topics_header"), "<topics-count>");
|
||||
make_elem($("#stream-list-pinned-streams-container .markers-and-unreads"), "<pinned-count>");
|
||||
make_elem($("#stream-list-normal-streams-container .markers-and-unreads"), "<normal-count>");
|
||||
make_elem($("#stream-list-dormant-streams-container .markers-and-unreads"), "<inactive-count>");
|
||||
|
||||
left_sidebar_navigation_area.update_dom_with_unread_counts(counts, false);
|
||||
left_sidebar_navigation_area.update_starred_count(444, false);
|
||||
@@ -134,6 +138,10 @@ run_test("update_count_in_dom", () => {
|
||||
assert.equal($("<scheduled-count>").text(), "555");
|
||||
assert.equal($("<reminders-count>").text(), "888");
|
||||
assert.equal($("<topics-count>").text(), "666");
|
||||
// TODO/channel-folders: Do proper data setup so these are a number.
|
||||
assert.equal($("<pinned-count>").text(), "");
|
||||
assert.equal($("<normal-count>").text(), "");
|
||||
assert.equal($("<inactive-count>").text(), "");
|
||||
|
||||
counts.mentioned_message_count = 0;
|
||||
scheduled_messages.get_count = () => 0;
|
||||
|
||||
@@ -31,6 +31,11 @@ mock_esm("../src/unread", {
|
||||
stream_is_muted: false,
|
||||
muted_count: 0,
|
||||
}),
|
||||
get_counts: () => ({
|
||||
mentioned_message_count: 222,
|
||||
home_unread_messages: 333,
|
||||
stream_unread_messages: 666,
|
||||
}),
|
||||
stream_has_any_unread_mentions: () => stream_has_any_unread_mentions,
|
||||
stream_has_any_unmuted_mentions: () => noop,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user