Fix another PDF retrieval test after be8db4fc50
This commit is contained in:
parent
f3aef41c90
commit
477c28b1e3
2 changed files with 10 additions and 9 deletions
|
@ -931,6 +931,7 @@ describe("Zotero.ItemTreeView", function() {
|
||||||
// Wait for attachment item to be moved under new item
|
// Wait for attachment item to be moved under new item
|
||||||
await waitForItemEvent('add');
|
await waitForItemEvent('add');
|
||||||
await waitForItemEvent('modify');
|
await waitForItemEvent('modify');
|
||||||
|
await waitForItemEvent('modify');
|
||||||
|
|
||||||
assert.isFalse(Zotero.Items.get(attachmentIDs[0]).isTopLevelItem());
|
assert.isFalse(Zotero.Items.get(attachmentIDs[0]).isTopLevelItem());
|
||||||
|
|
||||||
|
|
|
@ -799,7 +799,6 @@ describe("Connector Server", function () {
|
||||||
httpd.registerFile("/test.pdf", file);
|
httpd.registerFile("/test.pdf", file);
|
||||||
|
|
||||||
var promise = waitForItemEvent('add');
|
var promise = waitForItemEvent('add');
|
||||||
var recognizerPromise = waitForRecognizer();
|
|
||||||
|
|
||||||
var origRequest = Zotero.HTTP.request.bind(Zotero.HTTP);
|
var origRequest = Zotero.HTTP.request.bind(Zotero.HTTP);
|
||||||
var called = 0;
|
var called = 0;
|
||||||
|
@ -836,15 +835,16 @@ describe("Connector Server", function () {
|
||||||
var ids = await promise;
|
var ids = await promise;
|
||||||
|
|
||||||
assert.lengthOf(ids, 1);
|
assert.lengthOf(ids, 1);
|
||||||
var item = Zotero.Items.get(ids[0]);
|
var attachment = Zotero.Items.get(ids[0]);
|
||||||
assert.isTrue(item.isImportedAttachment());
|
assert.isTrue(attachment.isImportedAttachment());
|
||||||
assert.equal(item.attachmentContentType, 'application/pdf');
|
assert.equal(attachment.attachmentContentType, 'application/pdf');
|
||||||
assert.isTrue(collection.hasItem(item.id));
|
assert.isTrue(collection.hasItem(attachment.id));
|
||||||
|
|
||||||
var progressWindow = await recognizerPromise;
|
await waitForItemEvent('add');
|
||||||
progressWindow.close();
|
await waitForItemEvent('modify');
|
||||||
Zotero.ProgressQueues.get('recognize').cancel();
|
await waitForItemEvent('modify');
|
||||||
assert.isFalse(item.isTopLevelItem());
|
|
||||||
|
assert.isFalse(attachment.isTopLevelItem());
|
||||||
|
|
||||||
stub.restore();
|
stub.restore();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue