Update Connector Server tests (#5148)

This commit is contained in:
Adomas Venčkauskas 2025-03-21 12:25:24 +02:00 • committed by Dan Stillman
parent 69dcbda1a0
commit 2cd4ba205a
2 changed files with 717 additions and 1405 deletions

View file

@ -214,13 +214,15 @@ Zotero.Translate.ItemSaver.prototype = {
if (snapshotContent) {
attachment.snapshotContent = snapshotContent;
}
new Promise(async (resolve, reject) => {
await new Promise(async (resolve, reject) => {
await this._saveAttachment(
attachment,
parentItemID,
(attachment, progress, e) => {
if (e) reject(e);
resolve(progress);
if (progress === 100) {
resolve(progress);
}
}
);
});
@ -595,7 +597,7 @@ Zotero.Translate.ItemSaver.prototype = {
newAttachment = yield this._saveAttachmentFile.apply(this, arguments);
}
else {
Zotero.debug('Translate: Ignoring attachment due to ATTACHMENT_MODE_IGNORE');
Zotero.debug(`Translate: Ignoring attachment ${attachment.title} due to ATTACHMENT_MODE_IGNORE`);
}
if (!newAttachment) return false; // attachmentCallback should not have been called in this case

File diff suppressed because it is too large Load diff