mirror of
https://github.com/zotero/zotero.git
synced 2026-10-10 03:28:10 +00:00
fix test breakage due to lazy row rendering in vt
This commit is contained in:
parent
392d7e90f6
commit
7e89aa9c54
1 changed files with 6 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue