From 0041445e5fed03d2a0c4afafae5eed8122c0eb91 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sat, 6 Jan 2018 18:39:12 +0100 Subject: [PATCH] starting to test TopNav --- js/test/TopNav.js | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 js/test/TopNav.js diff --git a/js/test/TopNav.js b/js/test/TopNav.js new file mode 100644 index 0000000..6b275c8 --- /dev/null +++ b/js/test/TopNav.js @@ -0,0 +1,46 @@ +'use strict'; +var common = require('../common'); + +describe('TopNav', function () { + describe('showViewButtons & hideViewButtons', function () { + before(function () { + cleanup(); + }); + + it( + 'display & hide navigation elements for viewing an existing paste', + function () { + var results = []; + $('body').html( + '' + ); + $.PrivateBin.TopNav.init(); + results.push( + $('#newbutton').hasClass('hidden') && + $('#clonebutton').hasClass('hidden') && + $('#rawtextbutton').hasClass('hidden') && + $('#qrcodelink').hasClass('hidden') + ); + cleanup(); + return results.every(element => element); + } + ); + }); +}); +