From 3942b0e0d524e201e8c0b6be2e07125507594551 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 30 Jan 2019 04:44:16 -0500 Subject: [PATCH] Fix a tag selector test after b1fad505d7 --- test/tests/tagSelectorTest.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/test/tests/tagSelectorTest.js b/test/tests/tagSelectorTest.js index 2e7e773b37..ce56b28694 100644 --- a/test/tests/tagSelectorTest.js +++ b/test/tests/tagSelectorTest.js @@ -295,16 +295,9 @@ describe("Tag Selector", function () { it("shouldn't re-insert a new tag that matches an existing color", function* () { var libraryID = Zotero.Libraries.userLibraryID; - /*// Remove all tags in library - var tags = yield Zotero.Tags.getAll(libraryID); - tags.forEach(function (tag) { - var tagID = Zotero.Tags.getID(tag); - yield Zotero.Tags.removeFromLibrary(libraryID, tagID); - });*/ - - // Add B and A as colored tags without any items - yield Zotero.Tags.setColor(libraryID, "B", '#990000'); - yield Zotero.Tags.setColor(libraryID, "A", '#CC9933'); + // Add A and B as colored tags without any items + yield Zotero.Tags.setColor(libraryID, "A", '#CC9933', 1); + yield Zotero.Tags.setColor(libraryID, "B", '#990000', 2); // Add A to an item to make it a real tag var item = createUnsavedDataObject('item'); @@ -324,7 +317,6 @@ describe("Tag Selector", function () { for (let i = 0; i < tagElems.length; i++) { tags.set(tagElems[i].textContent, i); } - assert.isAbove(tags.get("B"), 0); assert.isAbove(tags.get("B"), tags.get("A")); })