mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2026-03-05 13:30:32 -05:00
test: Copilots tries at fixing tests
This commit is contained in:
@@ -98,7 +98,7 @@ describe('AttachmentViewer', function () {
|
||||
(previewSupported ? !$('#attachmentPreview').hasClass('hidden') : $('#attachmentPreview').hasClass('hidden'))
|
||||
);
|
||||
let element = $('<div>');
|
||||
$.PrivateBin.AttachmentViewer.moveAttachmentTo(element, attachment[0], prefix + '%s' + postfix);
|
||||
$.PrivateBin.AttachmentViewer.moveAttachmentTo(element[0], attachment[0], prefix + '%s' + postfix);
|
||||
// messageIDs with links get a relaxed treatment
|
||||
if (prefix.indexOf('<a') === -1 && postfix.indexOf('<a') === -1) {
|
||||
result = $('<textarea>').text((prefix + filename + postfix)).text();
|
||||
|
||||
@@ -88,7 +88,7 @@ describe('Helper', function () {
|
||||
$('body').html('<div id="foo"></div>');
|
||||
let e = $('#foo');
|
||||
e.text(content);
|
||||
$.PrivateBin.Helper.urls2links(e);
|
||||
$.PrivateBin.Helper.urls2links(e[0]);
|
||||
let result = e.text();
|
||||
clean();
|
||||
return content === result;
|
||||
@@ -121,7 +121,7 @@ describe('Helper', function () {
|
||||
postfix = '';
|
||||
}
|
||||
e.text(prefix + urlString + postfix);
|
||||
$.PrivateBin.Helper.urls2links(e);
|
||||
$.PrivateBin.Helper.urls2links(e[0]);
|
||||
let result = e.html();
|
||||
clean();
|
||||
urlString = $('<div />').text(urlString).html();
|
||||
@@ -144,7 +144,7 @@ describe('Helper', function () {
|
||||
$('body').html('<div id="foo"></div>');
|
||||
let e = $('#foo');
|
||||
e.text(prefix + url + postfix);
|
||||
$.PrivateBin.Helper.urls2links(e);
|
||||
$.PrivateBin.Helper.urls2links(e[0]);
|
||||
let result = e.html();
|
||||
clean();
|
||||
url = $('<div />').text(url).html();
|
||||
|
||||
Reference in New Issue
Block a user