Fix reselection of trash after restart

This commit is contained in:
Dan Stillman 2015-05-24 22:04:40 -04:00
parent dd52206b37
commit 6933f64616
2 changed files with 19 additions and 16 deletions

View file

@ -56,6 +56,16 @@ describe("Zotero.CollectionTreeView", function() {
})
})
describe("#selectByID", function () {
it("should select the trash", function* () {
yield collectionsView.selectByID("T1");
var row = collectionsView.selection.currentIndex;
var treeRow = collectionsView.getRow(row);
assert.ok(treeRow.isTrash());
assert.equal(treeRow.ref.libraryID, Zotero.Libraries.userLibraryID);
})
})
describe("#notify()", function () {
it("should select a new collection", function* () {
// Create collection