diff --git a/frontend_tests/node_tests/alert_words_ui.js b/frontend_tests/node_tests/alert_words_ui.js index d953abe978..0cd2928e75 100644 --- a/frontend_tests/node_tests/alert_words_ui.js +++ b/frontend_tests/node_tests/alert_words_ui.js @@ -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()); +}); + diff --git a/tools/test-js-with-node b/tools/test-js-with-node index f0086c4f96..199e235e28 100755 --- a/tools/test-js-with-node +++ b/tools/test-js-with-node @@ -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',