mirror of https://github.com/zulip/zulip.git
tests: Export rewired variables.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
a37aab19ed
commit
db2723036f
|
@ -87,7 +87,8 @@ function set_next_start_time(current_time: number, typing_started_wait_period: n
|
|||
state.next_send_start_time = current_time + typing_started_wait_period;
|
||||
}
|
||||
|
||||
function actually_ping_server(
|
||||
// Exported for tests
|
||||
export function actually_ping_server(
|
||||
worker: TypingStatusWorker,
|
||||
recipient: Recipient,
|
||||
current_time: number,
|
||||
|
|
|
@ -60,7 +60,8 @@ export function get_recipient_label(message?: ComposeClosedMessage): string {
|
|||
return "";
|
||||
}
|
||||
|
||||
function update_reply_button_state(disable = false): void {
|
||||
// Exported for tests
|
||||
export function update_reply_button_state(disable = false): void {
|
||||
$(".compose_reply_button").attr("disabled", disable ? "disabled" : null);
|
||||
if (disable) {
|
||||
$("#compose_buttons .compose-reply-button-wrapper").attr(
|
||||
|
|
|
@ -475,7 +475,8 @@ function is_recipient_large_topic(): boolean {
|
|||
return topic_participant_count_more_than_threshold(stream_id, compose_state.topic());
|
||||
}
|
||||
|
||||
function wildcard_mention_policy_authorizes_user(): boolean {
|
||||
// Exported for tests
|
||||
export function wildcard_mention_policy_authorizes_user(): boolean {
|
||||
if (
|
||||
realm.realm_wildcard_mention_policy ===
|
||||
settings_config.wildcard_mention_policy_values.by_everyone.code
|
||||
|
|
|
@ -389,7 +389,8 @@ function reset_searchbox(clear = false): void {
|
|||
}
|
||||
}
|
||||
|
||||
function exit_search(opts: {keep_search_narrow_open: boolean}): void {
|
||||
// Exported for tests
|
||||
export function exit_search(opts: {keep_search_narrow_open: boolean}): void {
|
||||
const filter = narrow_state.filter();
|
||||
if (!filter || filter.is_common_narrow()) {
|
||||
// for common narrows, we change the UI (and don't redirect)
|
||||
|
|
|
@ -1054,7 +1054,8 @@ export function register_save_discard_widget_handlers(
|
|||
);
|
||||
}
|
||||
|
||||
function initialize_group_setting_widgets(): void {
|
||||
// Exported for tests
|
||||
export function initialize_group_setting_widgets(): void {
|
||||
const realm_group_permission_settings = Object.entries(
|
||||
realm.server_supported_permission_settings.realm,
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue