deprecated functions, fix test partially

This commit is contained in:
El RIDO 2022-02-20 21:07:04 +01:00
parent fbf0eae513
commit a0f8a667ae
No known key found for this signature in database
GPG key ID: 0F5C940A6BD81F92
3 changed files with 6 additions and 8 deletions

View file

@ -110,4 +110,3 @@ describe('DiscussionViewer', function () {
);
});
});

View file

@ -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 () {
);
});
});

View file

@ -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(
'<nav><div class="navbar-header"><button type="button" ' +
'class="navbar-toggle collapsed" data-toggle="collapse" ' +
@ -301,7 +302,7 @@ describe('TopNav', function () {
$('.navbar-toggle').hasClass('collapsed') &&
$('#navbar').attr('aria-expanded') != 'true'
);
$('.navbar-toggle').click();
$('.navbar-toggle').trigger('click');
results.push(
!$('.navbar-toggle').hasClass('collapsed') &&
$('#navbar').attr('aria-expanded') == 'true'
@ -311,7 +312,7 @@ describe('TopNav', function () {
$('.navbar-toggle').hasClass('collapsed') &&
$('#navbar').attr('aria-expanded') == 'false'
);
cleanup();
clean();
assert.ok(results.every(element => element));
}
);
@ -670,4 +671,3 @@ describe('TopNav', function () {
);
});
});