www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit c2d32c2e271114c41785226eb46f41332a66077c
parent c7c58f83438acd959afa0d9d33102102088dd5ec
Author: Simon Kornblith <simon@simonster.com>
Date:   Mon,  9 Mar 2015 14:39:04 -0400

Just give up on trying to automate the panel itself

Diffstat:
Mchrome/content/zotero/bindings/guidancepanel.xml | 1+
Mdefaults/preferences/zotero.js | 1+
Mtest/runtests.sh | 2++
Mtest/tests/lookup.js | 15++++-----------
4 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/chrome/content/zotero/bindings/guidancepanel.xml b/chrome/content/zotero/bindings/guidancepanel.xml @@ -36,6 +36,7 @@ <body> <![CDATA[ Components.utils.import("resource://gre/modules/Services.jsm"); + if(!Zotero.Prefs.get("firstRunGuidance")) return; var about = this.getAttribute("about"), pref = "firstRunGuidanceShown."+about, diff --git a/defaults/preferences/zotero.js b/defaults/preferences/zotero.js @@ -44,6 +44,7 @@ pref("extensions.zotero.sortAttachmentsChronologically", false); pref("extensions.zotero.showTrashWhenEmpty", true); pref("extensions.zotero.trashAutoEmptyDays", 30); pref("extensions.zotero.viewOnDoubleClick", true); +pref("extensions.zotero.firstRunGuidance", true); pref("extensions.zotero.groups.copyChildLinks", true); pref("extensions.zotero.groups.copyChildFileAttachments", true); diff --git a/test/runtests.sh b/test/runtests.sh @@ -55,6 +55,8 @@ echo "`dirname "$CWD"`" > "$PROFILE/extensions/zotero@chnm.gmu.edu" cat <<EOF > "$PROFILE/prefs.js" user_pref("extensions.autoDisableScopes", 0); user_pref("extensions.zotero.debug.log", $DEBUG); +user_pref("extensions.zotero.firstRunGuidance", false); +user_pref("extensions.zotero.firstRun2", false); EOF MOZ_NO_REMOTE=1 NO_EM_RESTART=1 "$FX_EXECUTABLE" -profile "$PROFILE" \ diff --git a/test/tests/lookup.js b/test/tests/lookup.js @@ -1,15 +1,8 @@ function lookupIdentifier(win, identifier) { - var tbbutton = win.document.getElementById("zotero-tb-lookup"); - tbbutton.open = true; - return waitForDOMEvent(win.document.getElementById("zotero-lookup-panel"), "popupshown").then(function() { - tbbutton.open = true; // Shouldn't be necessary, but seems to be on Fx ESR under Xvfb - var textbox = win.document.getElementById("zotero-lookup-textbox"); - textbox.value = identifier; - textbox.focus(); - EventUtils.synthesizeKey("VK_RETURN", {}, win); - var closePromise = waitForDOMEvent(win.document.getElementById("zotero-lookup-panel"), "popuphidden"); - return waitForItemEvent("add"); - }); + var textbox = win.document.getElementById("zotero-lookup-textbox"); + textbox.value = identifier; + win.Zotero_Lookup.accept(textbox); + return waitForItemEvent("add"); } describe("Add Item by Identifier", function() {