From 3ec190d30ba03dd9f2d6c60cc90a1717e6d33e03 Mon Sep 17 00:00:00 2001 From: Steve Howell Date: Sun, 27 Jun 2021 13:51:56 +0000 Subject: [PATCH] node tests: Use mock_template in settings_user_groups. --- frontend_tests/node_tests/settings_user_groups.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend_tests/node_tests/settings_user_groups.js b/frontend_tests/node_tests/settings_user_groups.js index ed374e755a..367385f6c9 100644 --- a/frontend_tests/node_tests/settings_user_groups.js +++ b/frontend_tests/node_tests/settings_user_groups.js @@ -19,7 +19,6 @@ const pills = { let create_item_handler; -const render_admin_user_group_list = mock_template("/settings/admin_user_group_list.hbs"); const channel = mock_esm("../../static/js/channel"); const confirm_dialog = mock_esm("../../static/js/confirm_dialog"); const input_pill = mock_esm("../../static/js/input_pill"); @@ -31,6 +30,9 @@ const user_groups = mock_esm("../../static/js/user_groups", { }); const ui_report = mock_esm("../../static/js/ui_report"); +const render_admin_user_group_list = mock_template("settings/admin_user_group_list.hbs"); +const render_confirm_delete_user = mock_template("confirm_dialog/confirm_delete_user.hbs"); + const people = zrequire("people"); const settings_config = zrequire("settings_config"); const settings_user_groups = zrequire("settings_user_groups"); @@ -518,6 +520,13 @@ test_ui("reset", () => { }); test_ui("on_events", ({override}) => { + override(render_confirm_delete_user, "f", (data) => { + assert.deepEqual(data, { + group_name: "Mobile", + }); + return "stub"; + }); + override(settings_user_groups, "can_edit", () => true); (function test_admin_user_group_form_submit_triggered() {