message_scroll: Extract module message_feed_top_notices.

This commit is contained in:
Tim Abbott
2023-05-31 16:57:47 -07:00
parent 2de9db9305
commit 713a64d415
7 changed files with 82 additions and 76 deletions

View File

@@ -40,7 +40,7 @@ const message_util = mock_esm("../src/message_util");
const stream_list = mock_esm("../src/stream_list", {
maybe_scroll_narrow_into_view() {},
});
mock_esm("../src/message_scroll", {
mock_esm("../src/message_feed_top_notices", {
update_top_of_narrow_notices() {},
});
mock_esm("../src/message_feed_loading", {

View File

@@ -24,7 +24,7 @@ const message_lists = mock_esm("../src/message_lists", {
message_lists.current = msg_list;
},
});
const message_scroll = mock_esm("../src/message_scroll");
const message_feed_top_notices = mock_esm("../src/message_feed_top_notices");
const message_feed_loading = mock_esm("../src/message_feed_loading");
const message_view_header = mock_esm("../src/message_view_header");
const notifications = mock_esm("../src/notifications");
@@ -86,7 +86,7 @@ function test_helper() {
stub(hashchange, "save_narrow");
stub(message_feed_loading, "hide_indicators");
stub(message_feed_loading, "show_loading_older");
stub(message_scroll, "hide_top_of_narrow_notices");
stub(message_feed_top_notices, "hide_top_of_narrow_notices");
stub(notifications, "redraw_title");
stub(search, "update_button_visibility");
stub(stream_list, "handle_narrow_activated");
@@ -185,7 +185,7 @@ run_test("basics", () => {
assert.equal(narrow_state.narrowed_to_pms(), false);
helper.assert_events([
[message_scroll, "hide_top_of_narrow_notices"],
[message_feed_top_notices, "hide_top_of_narrow_notices"],
[message_feed_loading, "hide_indicators"],
[compose_banner, "clear_message_sent_banners"],
[notifications, "redraw_title"],