From 7e89aa9c5426b7622944ba1258df5a2249c15186 Mon Sep 17 00:00:00 2001 From: Bogdan Abaev Date: Tue, 21 Apr 2026 22:37:51 -0700 Subject: [PATCH] fix test breakage due to lazy row rendering in vt --- test/tests/citationDialogTest.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/tests/citationDialogTest.js b/test/tests/citationDialogTest.js index b79fc24ee9..56f586dd43 100644 --- a/test/tests/citationDialogTest.js +++ b/test/tests/citationDialogTest.js @@ -537,11 +537,14 @@ describe("Citation Dialog", function () { assert.include(libraryIDs, libraryOne.id); assert.notInclude(libraryIDs, libraryTwo.id); assert.notInclude(libraryIDs, citedOne.id); - // Make sure actual nodes for search matches are rendered + // Make sure all expected items are present in the list rows. + // VT only renders visible rows so we check _listRows, not the DOM. let expectedItemCardIDs = [...selectedIDs, ...openIDs, ...citedIDs, ...libraryIDs]; + let listRowIDs = dialog.listLayout._listRows + .filter(r => r.kind === "item" && r.ref) + .map(r => r.ref.id); for (let itemID of expectedItemCardIDs) { - let node = dialog.document.querySelector(`.item[id="${itemID}"]`); - assert.isOk(node); + assert.include(listRowIDs, itemID); } });