Just give up on trying to automate the panel itself

This commit is contained in:
Simon Kornblith 2015-03-09 14:39:04 -04:00
parent c7c58f8343
commit c2d32c2e27
4 changed files with 8 additions and 11 deletions

View File

@ -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,

View File

@ -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);

View File

@ -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" \

View File

@ -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() {