Fix sorting by Item Type and feed item itemID
Regression from a8ed30ce80
This commit is contained in:
parent
cba70856b7
commit
3ab661b628
2 changed files with 18 additions and 7 deletions
|
@ -152,7 +152,7 @@ describe("Zotero.ItemTree", function() {
|
|||
})
|
||||
|
||||
describe("#getSortFields()", function () {
|
||||
before(async function () {
|
||||
beforeEach(async function () {
|
||||
itemsView = zp.itemsView;
|
||||
|
||||
// Sort by title
|
||||
|
@ -183,6 +183,15 @@ describe("Zotero.ItemTree", function() {
|
|||
// fallbackSort pref with title moved to beginning
|
||||
assert.sameMembers(['title', 'firstCreator', 'date', 'dateAdded'], fields);
|
||||
});
|
||||
|
||||
it("should sort by item type", async function () {
|
||||
// Sort by item type
|
||||
const colIndex = itemsView.tree._getColumns().findIndex(column => column.dataKey == 'itemType');
|
||||
await itemsView.tree._columns.toggleSort(colIndex);
|
||||
|
||||
var fields = itemsView.getSortFields();
|
||||
assert.sameMembers(['itemType', 'firstCreator', 'date', 'title', 'dateAdded'], fields);
|
||||
});
|
||||
});
|
||||
|
||||
describe("#notify()", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue