Don't show items with annotated attachments after moving to trash
https://forums.zotero.org/discussion/100775/deleted-items-keep-reappearing-in-my-library
Regression from c3ee588bf
This commit is contained in:
parent
ca1f83e9c9
commit
76f2f0c783
2 changed files with 46 additions and 8 deletions
|
@ -610,6 +610,36 @@ describe("Zotero.Search", function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe("deleted", function () {
|
||||
describe("if not present", function () {
|
||||
it("should not match regular items in trash with annotated child attachments", async function () {
|
||||
var item = await createDataObject('item');
|
||||
item.deleted = true;
|
||||
await item.saveTx();
|
||||
var attachment = await importPDFAttachment(item);
|
||||
await createAnnotation('highlight', attachment);
|
||||
|
||||
var s = new Zotero.Search();
|
||||
s.libraryID = userLibraryID;
|
||||
var matches = await s.search();
|
||||
assert.notInclude(matches, attachment.id);
|
||||
});
|
||||
|
||||
it("should not match regular items with annotated child attachments in trash", async function () {
|
||||
var item = await createDataObject('item');
|
||||
var attachment = await importPDFAttachment(item);
|
||||
attachment.deleted = true;
|
||||
await attachment.saveTx();
|
||||
await createAnnotation('highlight', attachment);
|
||||
|
||||
var s = new Zotero.Search();
|
||||
s.libraryID = userLibraryID;
|
||||
var matches = await s.search();
|
||||
assert.notInclude(matches, attachment.id);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue