From a1143096253aa835a09c2db2602d2cdc7983d2ac Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 29 Nov 2016 04:26:58 -0500 Subject: [PATCH] Note editor test tweaks, which may or may not fix Travis failures --- test/tests/noteeditorTest.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/tests/noteeditorTest.js b/test/tests/noteeditorTest.js index 1b61f7e2f..995aff4e5 100644 --- a/test/tests/noteeditorTest.js +++ b/test/tests/noteeditorTest.js @@ -9,8 +9,9 @@ describe("Note Editor", function () { }); beforeEach(function* () { - // Avoid "this._editor is undefined" error between tests - yield Zotero.Promise.delay(1); + // Avoid "this._editor is undefined" error between tests, + // though there's definitely a better way to fix this + yield Zotero.Promise.delay(50); }); after(function () { @@ -26,6 +27,8 @@ describe("Note Editor", function () { var tagsBox = linksBox.id('tagsPopup').firstChild; var tagRows = tagsBox.id('tagRows'); assert.equal(tagRows.childNodes.length, 1); + + linksBox.id('tagsPopup').hidePopup(); }); it("should only open one new row for editing", function* () { @@ -41,6 +44,8 @@ describe("Note Editor", function () { var tagsBox = linksBox.id('tagsPopup').firstChild; var tagRows = tagsBox.id('tagRows'); assert.equal(tagRows.childNodes.length, 1); + + linksBox.id('tagsPopup').hidePopup(); }); it("should show tags in alphabetical order", function* () {