Fix potential error in libraryTreeView::#_removeRow() test
This commit is contained in:
parent
48260e22a9
commit
91b0acac1e
1 changed files with 4 additions and 4 deletions
|
@ -31,15 +31,15 @@ describe("Zotero.LibraryTreeView", function() {
|
|||
it("should remove the last row", function* () {
|
||||
var collection = yield createDataObject('collection');
|
||||
yield waitForItemsLoad(win);
|
||||
var item1 = yield createDataObject('item', { collections: [collection.id] });
|
||||
var item2 = yield createDataObject('item', { collections: [collection.id] });
|
||||
yield createDataObject('item', { collections: [collection.id] });
|
||||
yield createDataObject('item', { collections: [collection.id] });
|
||||
|
||||
var view = zp.itemsView;
|
||||
assert.equal(view.getRowIndexByID(item2.id), 1);
|
||||
var treeViewID = view.getRow(1).id;
|
||||
zp.itemsView._removeRow(1);
|
||||
|
||||
assert.equal(view.rowCount, 1);
|
||||
assert.isFalse(view.getRowIndexByID(item2.id));
|
||||
assert.isFalse(view.getRowIndexByID(treeViewID));
|
||||
});
|
||||
});
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue