mirror of https://github.com/zulip/zulip.git
tests: Test closing alert word status msg.
This commit is contained in:
parent
056e7e9a31
commit
565fd75661
|
@ -159,3 +159,23 @@ run_test('remove_alert_word', () => {
|
|||
assert(alert_word_status.visible());
|
||||
});
|
||||
|
||||
run_test('close_status_message', () => {
|
||||
var alert_word_settings = $('#alert-word-settings');
|
||||
var close = alert_word_settings.get_on_handler('click', '.close-alert-word-status');
|
||||
|
||||
var alert = $('.alert');
|
||||
var close_btn = $('.close-alert-word-status');
|
||||
close_btn.set_parents_result('.alert', alert);
|
||||
|
||||
alert.show();
|
||||
|
||||
var event = {
|
||||
preventDefault: () => {},
|
||||
currentTarget: '.close-alert-word-status',
|
||||
};
|
||||
|
||||
assert(alert.visible());
|
||||
close(event);
|
||||
assert(!alert.visible());
|
||||
});
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ USAGE = '''
|
|||
enforce_fully_covered = {
|
||||
'static/js/activity.js',
|
||||
'static/js/alert_words.js',
|
||||
'static/js/alert_words_ui.js',
|
||||
'static/js/bot_data.js',
|
||||
'static/js/buddy_data.js',
|
||||
'static/js/buddy_list.js',
|
||||
|
|
Loading…
Reference in New Issue