Fix "Add Item by Identifier" (broken by 78b1d2ee3)

And make lookup tests run when not on Travis, though we should still mock the
HTTP requests.
This commit is contained in:
Dan Stillman 2016-12-13 05:23:21 -05:00
parent 69430d74b2
commit 7fc352b9b7
2 changed files with 74 additions and 63 deletions

View file

@ -1,19 +1,26 @@
function lookupIdentifier(win, identifier) {
var lookupIdentifier = Zotero.Promise.coroutine(function* (win, identifier) {
var textbox = win.document.getElementById("zotero-lookup-textbox");
textbox.value = identifier;
win.Zotero_Lookup.accept(textbox);
return waitForItemEvent("add");
}
var promise = waitForItemEvent("add");
yield win.Zotero_Lookup.accept(textbox);
return promise;
});
describe.skip("Add Item by Identifier", function() {
describe("Add Item by Identifier", function() {
var win;
before(function* () {
if (Zotero.automatedTest) {
this.skip();
return;
}
win = yield loadZoteroPane();
});
after(function() {
win.close();
if (win) {
win.close();
}
});
// TODO: mock external services: https://github.com/zotero/zotero/issues/699