Fx102: Fix Integration tests

This commit is contained in:
Adomas Venčkauskas 2022-10-25 13:48:39 +03:00
parent ee67c848d7
commit 87a567122e
2 changed files with 2 additions and 1 deletions

View file

@ -78,6 +78,7 @@ Zotero.Integration = new function() {
* Initialize LibreOffice, Word for Mac and Word for Windows plugin components.
*/
this.init = function () {
if (Zotero.test) return;
let classNames = ["@zotero.org/Zotero/integration/initializer?agent=LibreOffice;1"];
if (Zotero.isMac) {
classNames.push("@zotero.org/Zotero/integration/installer?agent=MacWord;1")

View file

@ -353,7 +353,7 @@ describe("Zotero.Integration", function () {
displayDialogStub = sinon.stub(Zotero.Integration, 'displayDialog');
displayDialogStub.callsFake(async function(dialogName, prefs, io) {
Zotero.debug(`Display dialog: ${dialogName}`, 2);
var ioResult = dialogResults[dialogName.substring(dialogName.lastIndexOf('/')+1, dialogName.length-4)];
var ioResult = dialogResults[dialogName.substring(dialogName.lastIndexOf('/')+1, dialogName.length-6)];
if (typeof ioResult == 'function') {
await ioResult(dialogName, io);
} else {