From 6dfd8965f15cd68f57bd91004e856683adadbced Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Mon, 24 Jun 2024 02:28:15 -0400 Subject: [PATCH] Fix hanging tests after c384fef8675 --- test/tests/zoteroPaneTest.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/tests/zoteroPaneTest.js b/test/tests/zoteroPaneTest.js index 5e81c685fe..22261c1f81 100644 --- a/test/tests/zoteroPaneTest.js +++ b/test/tests/zoteroPaneTest.js @@ -20,9 +20,7 @@ describe("ZoteroPane", function() { var collection1 = await createDataObject('collection'); var collection2 = await createDataObject('collection', { parentID: collection1.id, deleted: true }); - var userLibraryID = Zotero.Libraries.userLibraryID; - await zp.collectionsView.selectByID('T' + userLibraryID); - await waitForItemsLoad(win); + await selectTrash(win); var row = zp.itemsView.getRowIndexByID(collection2.treeViewID); zp.itemsView.selection.select(row); @@ -34,9 +32,11 @@ describe("ZoteroPane", function() { var rows = win.document.querySelectorAll('.highlighted'); assert.lengthOf(rows, 1); - zp.collectionsView.setHighlightedRows(); + await zp.collectionsView.setHighlightedRows(); spy.restore(); + // Switch back to library to avoid breaking other tests + await selectLibrary(win); }); });