From c6e0f2d22347ae7f9b45482c65c2b307d20e2586 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sat, 4 Nov 2017 07:44:42 +0100 Subject: [PATCH] adding test for hiding messages --- js/test.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/js/test.js b/js/test.js index 2462cc27..f5100af0 100644 --- a/js/test.js +++ b/js/test.js @@ -1089,5 +1089,29 @@ describe('Alert', function () { } ); }); + + describe('hideMessages', function () { + before(function () { + cleanup(); + }); + + it( + 'hides all messages', + function() { + $('body').html( + '' + + '' + ); + $.PrivateBin.Alert.init(); + $.PrivateBin.Alert.hideMessages(); + return $('#statusmessage').hasClass('hidden') && + $('#errormessage').hasClass('hidden'); + } + ); + }); });