mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-10-01 01:26:10 -04:00
deprecated functions, fix test partially
This commit is contained in:
parent
fbf0eae513
commit
a0f8a667ae
@ -110,4 +110,3 @@ describe('DiscussionViewer', function () {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -52,12 +52,12 @@ describe('Editor', function () {
|
|||||||
!$.PrivateBin.Editor.isPreview() &&
|
!$.PrivateBin.Editor.isPreview() &&
|
||||||
!$('#message').hasClass('hidden')
|
!$('#message').hasClass('hidden')
|
||||||
);
|
);
|
||||||
$('#messagepreview').click();
|
$('#messagepreview').trigger('click');
|
||||||
results.push(
|
results.push(
|
||||||
$.PrivateBin.Editor.isPreview() &&
|
$.PrivateBin.Editor.isPreview() &&
|
||||||
$('#message').hasClass('hidden')
|
$('#message').hasClass('hidden')
|
||||||
);
|
);
|
||||||
$('#messageedit').click();
|
$('#messageedit').trigger('click');
|
||||||
results.push(
|
results.push(
|
||||||
!$.PrivateBin.Editor.isPreview() &&
|
!$.PrivateBin.Editor.isPreview() &&
|
||||||
!$('#message').hasClass('hidden')
|
!$('#message').hasClass('hidden')
|
||||||
@ -68,4 +68,3 @@ describe('Editor', function () {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -280,7 +280,8 @@ describe('TopNav', function () {
|
|||||||
it(
|
it(
|
||||||
'collapses the navigation when displayed on a small screen',
|
'collapses the navigation when displayed on a small screen',
|
||||||
function () {
|
function () {
|
||||||
var results = [];
|
var clean = jsdom(),
|
||||||
|
results = [];
|
||||||
$('body').html(
|
$('body').html(
|
||||||
'<nav><div class="navbar-header"><button type="button" ' +
|
'<nav><div class="navbar-header"><button type="button" ' +
|
||||||
'class="navbar-toggle collapsed" data-toggle="collapse" ' +
|
'class="navbar-toggle collapsed" data-toggle="collapse" ' +
|
||||||
@ -301,7 +302,7 @@ describe('TopNav', function () {
|
|||||||
$('.navbar-toggle').hasClass('collapsed') &&
|
$('.navbar-toggle').hasClass('collapsed') &&
|
||||||
$('#navbar').attr('aria-expanded') != 'true'
|
$('#navbar').attr('aria-expanded') != 'true'
|
||||||
);
|
);
|
||||||
$('.navbar-toggle').click();
|
$('.navbar-toggle').trigger('click');
|
||||||
results.push(
|
results.push(
|
||||||
!$('.navbar-toggle').hasClass('collapsed') &&
|
!$('.navbar-toggle').hasClass('collapsed') &&
|
||||||
$('#navbar').attr('aria-expanded') == 'true'
|
$('#navbar').attr('aria-expanded') == 'true'
|
||||||
@ -311,7 +312,7 @@ describe('TopNav', function () {
|
|||||||
$('.navbar-toggle').hasClass('collapsed') &&
|
$('.navbar-toggle').hasClass('collapsed') &&
|
||||||
$('#navbar').attr('aria-expanded') == 'false'
|
$('#navbar').attr('aria-expanded') == 'false'
|
||||||
);
|
);
|
||||||
cleanup();
|
clean();
|
||||||
assert.ok(results.every(element => element));
|
assert.ok(results.every(element => element));
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@ -670,4 +671,3 @@ describe('TopNav', function () {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user