diff --git a/test/content/support.js b/test/content/support.js index 8e6b801ca..8ff21269c 100644 --- a/test/content/support.js +++ b/test/content/support.js @@ -114,16 +114,6 @@ function waitForCallback(cb, interval, timeout) { return deferred.promise; } -/** - * Returns a promise that is resolved once the translators are loaded. - */ -function waitForTranslators() { - return waitForCallback(function() { - // Just wait for the zotero.org translator to load - return !!Zotero.Translators.get("c82c574d-7fe8-49ca-a360-a05d6e34fec0"); - }); -} - /** * Ensures that the PDF tools are installed, or installs them if not. * Returns a promise. diff --git a/test/tests/lookup.js b/test/tests/lookup.js index 769fcd2a5..f49bef575 100644 --- a/test/tests/lookup.js +++ b/test/tests/lookup.js @@ -9,10 +9,11 @@ describe("Add Item by Identifier", function() { var win; before(function() { this.timeout(5000); + // Load a Zotero pane and update the translators (needed to + // make sure they're available before we run the tests) return loadZoteroPane().then(function(w) { win = w; - }).then(function() { - return waitForTranslators(); + return Zotero.Schema.updateBundledFiles('translators', null, false); }); }); after(function() { diff --git a/test/tests/recognizePDF.js b/test/tests/recognizePDF.js index d06f761ed..efba88d3a 100644 --- a/test/tests/recognizePDF.js +++ b/test/tests/recognizePDF.js @@ -4,11 +4,12 @@ describe("PDF Recognition", function() { var win; before(function() { this.timeout(60000); - return installPDFTools().then(function() { - return loadZoteroPane(); - }).then(function(w) { + // Load Zotero pane, install PDF tools, and load the + // translators + return Q.all([loadZoteroPane().then(function(w) { win = w; - }); + return Zotero.Schema.updateBundledFiles('translators', null, false); + }), installPDFTools()]); }); afterEach(function() { for(let win of getWindows("chrome://zotero/content/pdfProgress.xul")) {