From 459e26490afeeac1ba3bfa7444ead49448aa7897 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 18 Sep 2017 17:45:33 -0400 Subject: [PATCH] Better isolate collectionTreeView test --- test/tests/collectionTreeViewTest.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/tests/collectionTreeViewTest.js b/test/tests/collectionTreeViewTest.js index 438f65c9ed..6b71d99c9e 100644 --- a/test/tests/collectionTreeViewTest.js +++ b/test/tests/collectionTreeViewTest.js @@ -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;