diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index ba00b601d..f38fb3727 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -178,7 +178,7 @@ Components.utils.import("resource://gre/modules/osfile.jsm"); if (options) { if (options.openPane) this.openPane = true; - if (options.noUserInput) this.noUserInput = true; + if (options.automatedTest) this.automatedTest = true; if (options.skipBundledFiles) this.skipBundledFiles = true; } @@ -1348,19 +1348,11 @@ Components.utils.import("resource://gre/modules/osfile.jsm"); /** * Display an alert in a given window * - * This is just a wrapper around nsIPromptService.alert() that takes the Zotero.noUserInput - * flag into consideration - * * @param {Window} * @param {String} title * @param {String} msg */ this.alert = function (window, title, msg) { - if (this.noUserInput) { - Zotero.debug("Not displaying alert: " + title + ": " + msg); - return; - } - var ps = Components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getService(Components.interfaces.nsIPromptService); ps.alert(window, title, msg); diff --git a/components/zotero-service.js b/components/zotero-service.js index 8470a78aa..07716147c 100644 --- a/components/zotero-service.js +++ b/components/zotero-service.js @@ -489,8 +489,8 @@ ZoteroCommandLineHandler.prototype = { } } - if (cmdLine.handleFlag("ZoteroNoUserInput", false)) { - zInitOptions.noUserInput = true; + if (cmdLine.handleFlag("ZoteroAutomatedTest", false)) { + zInitOptions.automatedTest = true; } if (cmdLine.handleFlag("ZoteroSkipBundledFiles", false)) { zInitOptions.skipBundledFiles = true; diff --git a/test/content/runtests.js b/test/content/runtests.js index 945c1bbb0..7057c1df4 100644 --- a/test/content/runtests.js +++ b/test/content/runtests.js @@ -141,7 +141,7 @@ function Reporter(runner) { // Dark red X for errors + "\033[31;40m" + Mocha.reporters.Base.symbols.err + " [FAIL]\033[0m" // Trigger bell if interactive - + (Zotero.noUserInput ? "" : "\007") + + (Zotero.automatedTest ? "" : "\007") + " " + test.title + "\n" + indentStr + " " + err.toString() + " at\n" + err.stack.replace(/^/gm, indentStr + " ")); diff --git a/test/runtests.sh b/test/runtests.sh index c0dd2322d..c1054e217 100755 --- a/test/runtests.sh +++ b/test/runtests.sh @@ -132,7 +132,7 @@ fi if [ "$TRAVIS" = true ]; then - FX_ARGS="$FX_ARGS -ZoteroNoUserInput -ZoteroTestTimeout 10000" + FX_ARGS="$FX_ARGS -ZoteroAutomatedTest -ZoteroTestTimeout 10000" fi # Clean up on exit diff --git a/test/tests/recognizePDFTest.js b/test/tests/recognizePDFTest.js index 2ce0e6218..df119caf1 100644 --- a/test/tests/recognizePDFTest.js +++ b/test/tests/recognizePDFTest.js @@ -52,7 +52,7 @@ describe.skip("PDF Recognition", function() { }); it("should recognize a PDF without a DOI", function* () { - if (Zotero.noUserInput) this.skip(); // CAPTCHAs make this fail + if (Zotero.automatedTest) this.skip(); // CAPTCHAs make this fail this.timeout(30000); // Import the PDF