commit 459e26490afeeac1ba3bfa7444ead49448aa7897
parent afc7afeb9cc98a435251df62a371fdc979c391b4
Author: Dan Stillman <dstillman@zotero.org>
Date: Mon, 18 Sep 2017 17:45:33 -0400
Better isolate collectionTreeView test
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git 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;