|
|
@@ -16,7 +16,7 @@ describe('TopNav', function () {
|
|
|
});
|
|
|
|
|
|
it(
|
|
|
- 'shows navigation elements when the QR code button is disabled',
|
|
|
+ 'shows and hides navigation elements when the QR code button is disabled',
|
|
|
function () {
|
|
|
document.documentElement.innerHTML =
|
|
|
'<nav><button id="newbutton" class="hidden"></button>' +
|
|
|
@@ -32,6 +32,14 @@ describe('TopNav', function () {
|
|
|
assert.ok(!query('#clonebutton').classList.contains('hidden'));
|
|
|
assert.ok(!query('#rawtextbutton').classList.contains('hidden'));
|
|
|
assert.ok(!query('#downloadtextbutton').classList.contains('hidden'));
|
|
|
+
|
|
|
+ assert.doesNotThrow(function () {
|
|
|
+ PrivateBin.TopNav.hideViewButtons();
|
|
|
+ });
|
|
|
+ assert.ok(query('#newbutton').classList.contains('hidden'));
|
|
|
+ assert.ok(query('#clonebutton').classList.contains('hidden'));
|
|
|
+ assert.ok(query('#rawtextbutton').classList.contains('hidden'));
|
|
|
+ assert.ok(query('#downloadtextbutton').classList.contains('hidden'));
|
|
|
cleanup();
|
|
|
}
|
|
|
);
|