Better isolate collectionTreeView test

This commit is contained in:
Dan Stillman 2017-09-18 17:45:33 -04:00
parent afc7afeb9c
commit 459e26490a

View file

@ -628,6 +628,13 @@ describe("Zotero.CollectionTreeView", function() {
describe("My Publications", function () {
it("should add an item to My Publications", function* () {
// Remove other items in My Publications
var s = new Zotero.Search();
s.addCondition('libraryID', 'is', Zotero.Libraries.userLibraryID);
s.addCondition('publications', 'true');
var ids = yield s.search();
yield Zotero.Items.erase(ids);
var item = yield createDataObject('item', false, { skipSelect: true });
var libraryID = item.libraryID;