From 984941f901493173d4a1065cdfd4937a4589d498 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Thu, 16 Nov 2017 09:04:27 +0100 Subject: [PATCH] adding test for hiding messages --- js/test.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/js/test.js b/js/test.js index dfbeb38f..a59885a5 100644 --- a/js/test.js +++ b/js/test.js @@ -1243,5 +1243,24 @@ describe('PasteStatus', function () { } ); }); + + describe('hideMessages', function () { + before(function () { + cleanup(); + }); + + it( + 'hides all messages', + function() { + $('body').html( + '
' + ); + $.PrivateBin.PasteStatus.init(); + $.PrivateBin.PasteStatus.hideMessages(); + return $('#remainingtime').hasClass('hidden') && + $('#pastesuccess').hasClass('hidden'); + } + ); + }); });