Compare commits

...

2 Commits

Author SHA1 Message Date
Dan Stillman
1c0f6fc2d3 More debugging for updateSession failures 2018-02-11 03:52:44 -05:00
Dan Stillman
07c9f8ee0e Debugging for updateSession test failures 2018-02-11 01:54:32 -05:00

View File

@ -429,6 +429,8 @@ describe("Connector Server", function () {
describe("/connector/updateSession", function () {
it("should update collections and tags of item saved via /saveItems", async function () {
Zotero.Debug.setStore(true);
var collection1 = await createDataObject('collection');
var collection2 = await createDataObject('collection');
await waitForItemsLoad(win);
@ -506,6 +508,10 @@ describe("Connector Server", function () {
}
);
var log = await Zotero.Debug.get();
Zotero.Debug.setStore(false);
dump(log + "\n\n");
assert.equal(req.status, 200);
assert.isTrue(collection1.hasItem(item.id));
assert.isTrue(item.hasTag("A"));
@ -513,6 +519,7 @@ describe("Connector Server", function () {
});
it("should update collections and tags of PDF saved via /saveSnapshot", async function () {
Zotero.Debug.setStore(true);
var sessionID = Zotero.Utilities.randomString();
var collection1 = await createDataObject('collection');
@ -564,6 +571,10 @@ describe("Connector Server", function () {
}
);
var log = await Zotero.Debug.get();
Zotero.Debug.setStore(false);
dump(log + "\n\n");
assert.equal(req.status, 200);
assert.isTrue(collection1.hasItem(item.id));
assert.isTrue(item.hasTag("A"));
@ -571,6 +582,7 @@ describe("Connector Server", function () {
});
it("should update collections and tags of webpage saved via /saveSnapshot", async function () {
Zotero.Debug.setStore(true);
var sessionID = Zotero.Utilities.randomString();
var collection1 = await createDataObject('collection');
@ -620,10 +632,16 @@ describe("Connector Server", function () {
}
);
var log = await Zotero.Debug.get();
Zotero.Debug.setStore(false);
dump(log + "\n\n");
assert.equal(req.status, 200);
assert.isTrue(collection1.hasItem(item.id));
assert.isTrue(item.hasTag("A"));
assert.isTrue(item.hasTag("B"));
throw new Error("STOP");
});
});