mirror of https://github.com/zulip/zulip.git
tests: Mock empty lists correctly in page_params.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
parent
ece4d9344a
commit
0c8d199a3d
|
@ -278,6 +278,8 @@ run_test('get_invalid_recipient_emails', () => {
|
|||
user_id: 124,
|
||||
full_name: 'Welcome Bot',
|
||||
};
|
||||
page_params.realm_users = [];
|
||||
page_params.realm_non_active_users = [];
|
||||
page_params.cross_realm_bots = [welcome_bot];
|
||||
page_params.user_id = 30;
|
||||
people.initialize();
|
||||
|
|
|
@ -104,6 +104,8 @@ run_test('build_display_recipient', () => {
|
|||
user_id: 21,
|
||||
},
|
||||
];
|
||||
page_params.realm_non_active_users = [];
|
||||
page_params.cross_realm_bots = [];
|
||||
people.initialize();
|
||||
|
||||
let message = {
|
||||
|
@ -166,6 +168,8 @@ run_test('insert_local_message', () => {
|
|||
email: "iago@zulip.com",
|
||||
},
|
||||
];
|
||||
page_params.realm_non_active_users = [];
|
||||
page_params.cross_realm_bots = [];
|
||||
people.initialize();
|
||||
|
||||
let apply_markdown_called = false;
|
||||
|
|
|
@ -142,9 +142,22 @@ page_params.subscriptions = [];
|
|||
page_params.unsubscribed = [];
|
||||
page_params.never_subscribed = [];
|
||||
page_params.realm_notifications_stream_id = -1;
|
||||
page_params.unread_msgs = {};
|
||||
page_params.unread_msgs = {
|
||||
huddles: [],
|
||||
pms: [],
|
||||
streams: [],
|
||||
mentions: [],
|
||||
};
|
||||
page_params.recent_private_conversations = [];
|
||||
page_params.user_status = {};
|
||||
page_params.realm_users = [];
|
||||
page_params.realm_non_active_users = [];
|
||||
page_params.cross_realm_bots = [];
|
||||
page_params.muted_topics = [];
|
||||
page_params.realm_user_groups = [];
|
||||
page_params.realm_bots = [];
|
||||
page_params.realm_filters = [];
|
||||
page_params.starred_messages = [];
|
||||
|
||||
$('#tab_bar').append = () => {};
|
||||
$('#compose').filedrop = () => {};
|
||||
|
|
Loading…
Reference in New Issue