From a0f8a667aeeffa8ac795f6ec2d5c55436d033d59 Mon Sep 17 00:00:00 2001 From: El RIDO Date: Sun, 20 Feb 2022 21:07:04 +0100 Subject: [PATCH] deprecated functions, fix test partially --- js/test/DiscussionViewer.js | 1 - js/test/Editor.js | 5 ++--- js/test/TopNav.js | 8 ++++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/js/test/DiscussionViewer.js b/js/test/DiscussionViewer.js index 09697f3..f38596c 100644 --- a/js/test/DiscussionViewer.js +++ b/js/test/DiscussionViewer.js @@ -110,4 +110,3 @@ describe('DiscussionViewer', function () { ); }); }); - diff --git a/js/test/Editor.js b/js/test/Editor.js index 3f86257..4115aa4 100644 --- a/js/test/Editor.js +++ b/js/test/Editor.js @@ -52,12 +52,12 @@ describe('Editor', function () { !$.PrivateBin.Editor.isPreview() && !$('#message').hasClass('hidden') ); - $('#messagepreview').click(); + $('#messagepreview').trigger('click'); results.push( $.PrivateBin.Editor.isPreview() && $('#message').hasClass('hidden') ); - $('#messageedit').click(); + $('#messageedit').trigger('click'); results.push( !$.PrivateBin.Editor.isPreview() && !$('#message').hasClass('hidden') @@ -68,4 +68,3 @@ describe('Editor', function () { ); }); }); - diff --git a/js/test/TopNav.js b/js/test/TopNav.js index 2963964..12a8ccb 100644 --- a/js/test/TopNav.js +++ b/js/test/TopNav.js @@ -280,7 +280,8 @@ describe('TopNav', function () { it( 'collapses the navigation when displayed on a small screen', function () { - var results = []; + var clean = jsdom(), + results = []; $('body').html( '