tests: Test closing alert word status msg.

This commit is contained in:
Joshua Pan 2018-07-20 09:52:41 -07:00 committed by showell
parent 056e7e9a31
commit 565fd75661
2 changed files with 21 additions and 0 deletions

View File

@ -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());
});

View File

@ -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',