Compare commits
2 Commits
master
...
updateSess
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1c0f6fc2d3 | ||
![]() |
07c9f8ee0e |
|
@ -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");
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user