mirror of https://github.com/zulip/zulip.git
Add node tests for M hotkey.
This commit is contained in:
parent
76e84288d9
commit
7adf70e5ad
|
@ -140,7 +140,7 @@ function stubbing(func_name_to_stub, test_function) {
|
|||
// Unmapped keys should immediately return false, without
|
||||
// calling any functions outside of hotkey.js.
|
||||
assert_unmapped('abdefhlmnoptuxyz');
|
||||
assert_unmapped('BEFHILMNOQTUVWXYZ');
|
||||
assert_unmapped('BEFHILNOQTUVWXYZ');
|
||||
|
||||
// We have to skip some checks due to the way the code is
|
||||
// currently organized for mapped keys.
|
||||
|
@ -190,7 +190,7 @@ function stubbing(func_name_to_stub, test_function) {
|
|||
assert_mapping('g', 'gear_menu.open');
|
||||
|
||||
// Next, test keys that only work on a selected message.
|
||||
var message_view_only_keys = '@*+rRjJkKsSvi:G';
|
||||
var message_view_only_keys = '@*+rRjJkKsSvi:GM';
|
||||
|
||||
// Check that they do nothing without a selected message
|
||||
global.current_msg_list.empty = return_true;
|
||||
|
@ -200,7 +200,7 @@ function stubbing(func_name_to_stub, test_function) {
|
|||
|
||||
// Check that they do nothing while in the settings overlay
|
||||
hotkey.is_settings_page = return_true;
|
||||
assert_unmapped('@*+rRjJkKsSvi:G');
|
||||
assert_unmapped('@*+rRjJkKsSvi:GM');
|
||||
hotkey.is_settings_page = return_false;
|
||||
|
||||
// TODO: Similar check for being in the subs page
|
||||
|
@ -220,6 +220,7 @@ function stubbing(func_name_to_stub, test_function) {
|
|||
assert_mapping('i', 'popovers.open_message_menu');
|
||||
assert_mapping(':', 'popovers.toggle_reactions_popover', true);
|
||||
assert_mapping('G', 'navigate.to_end');
|
||||
assert_mapping('M', 'muting_ui.toggle_mute');
|
||||
}());
|
||||
|
||||
(function test_motion_keys() {
|
||||
|
|
Loading…
Reference in New Issue