mirror of https://github.com/zulip/zulip.git
node_test: Avoid make_zjquery.
We just use $.clear_all_elements() now.
This commit is contained in:
parent
9938811759
commit
706e2baf7e
|
@ -113,7 +113,7 @@ function stub_out_video_calls() {
|
|||
|
||||
function reset_jquery() {
|
||||
// Avoid leaks.
|
||||
set_global("$", make_zjquery());
|
||||
$.clear_all_elements();
|
||||
}
|
||||
|
||||
const new_user = {
|
||||
|
@ -206,7 +206,7 @@ run_test("validate_stream_message_address_info", () => {
|
|||
|
||||
run_test("validate", () => {
|
||||
function initialize_pm_pill() {
|
||||
set_global("$", make_zjquery());
|
||||
reset_jquery();
|
||||
|
||||
$("#compose-send-button").prop("disabled", false);
|
||||
$("#compose-send-button").trigger("focus");
|
||||
|
@ -1891,7 +1891,7 @@ run_test("create_message_object", () => {
|
|||
});
|
||||
|
||||
run_test("nonexistent_stream_reply_error", () => {
|
||||
set_global("$", make_zjquery());
|
||||
reset_jquery();
|
||||
|
||||
const actions = [];
|
||||
$("#nonexistent_stream_reply_error").show = () => {
|
||||
|
|
|
@ -93,7 +93,7 @@ run_test("basics", () => {
|
|||
});
|
||||
|
||||
function set_up() {
|
||||
set_global("$", make_zjquery());
|
||||
$.clear_all_elements();
|
||||
const items = {
|
||||
blue: {
|
||||
display_value: "BLUE",
|
||||
|
|
|
@ -121,7 +121,7 @@ function test_create_bot_type_input_box_toggle(f) {
|
|||
}
|
||||
|
||||
function set_up() {
|
||||
set_global("$", make_zjquery());
|
||||
$.clear_all_elements();
|
||||
|
||||
// bunch of stubs
|
||||
|
||||
|
|
|
@ -393,7 +393,7 @@ run_test("with_external_user", () => {
|
|||
};
|
||||
|
||||
// Reset zjquery to test stuff with user who cannot edit
|
||||
set_global("$", make_zjquery());
|
||||
$.clear_all_elements();
|
||||
|
||||
let user_group_find_called = 0;
|
||||
const user_group_stub = $(`div.user-group[id="${CSS.escape(1)}"]`);
|
||||
|
|
|
@ -368,7 +368,7 @@ run_test("uppy_config", () => {
|
|||
});
|
||||
|
||||
run_test("file_input", () => {
|
||||
set_global("$", make_zjquery());
|
||||
$.clear_all_elements();
|
||||
|
||||
upload.setup_upload({mode: "compose"});
|
||||
|
||||
|
@ -391,8 +391,7 @@ run_test("file_input", () => {
|
|||
});
|
||||
|
||||
run_test("file_drop", () => {
|
||||
set_global("$", make_zjquery());
|
||||
|
||||
$.clear_all_elements();
|
||||
upload.setup_upload({mode: "compose"});
|
||||
|
||||
let prevent_default_counter = 0;
|
||||
|
@ -431,7 +430,7 @@ run_test("file_drop", () => {
|
|||
});
|
||||
|
||||
run_test("copy_paste", () => {
|
||||
set_global("$", make_zjquery());
|
||||
$.clear_all_elements();
|
||||
|
||||
upload.setup_upload({mode: "compose"});
|
||||
|
||||
|
@ -472,7 +471,7 @@ run_test("copy_paste", () => {
|
|||
});
|
||||
|
||||
run_test("uppy_events", () => {
|
||||
set_global("$", make_zjquery());
|
||||
$.clear_all_elements();
|
||||
const callbacks = {};
|
||||
let uppy_cancel_all_called = false;
|
||||
let state = {};
|
||||
|
|
Loading…
Reference in New Issue