Fix test failure after a8ed30ce8
We added a `toggleSort()` call on the title, so then when called again it reverses the direction. To avoid, sort by creator and then title in the second test.
This commit is contained in:
parent
92a1a43cbb
commit
fea99bf8f8
1 changed files with 4 additions and 1 deletions
|
@ -616,7 +616,10 @@ describe("Zotero.ItemTree", function() {
|
|||
var item3 = await createDataObject('item', { title: title + " 5" });
|
||||
var item4 = await createDataObject('item', { title: title + " 7" });
|
||||
|
||||
const colIndex = itemsView.tree._getColumns().findIndex(column => column.dataKey == 'title');
|
||||
// Sort by creator and then title, to make sure we're sorting by title ascending
|
||||
var colIndex = itemsView.tree._getColumns().findIndex(column => column.dataKey == 'firstCreator');
|
||||
await itemsView.tree._columns.toggleSort(colIndex);
|
||||
colIndex = itemsView.tree._getColumns().findIndex(column => column.dataKey == 'title');
|
||||
await itemsView.tree._columns.toggleSort(colIndex);
|
||||
|
||||
// Check initial sort order
|
||||
|
|
Loading…
Add table
Reference in a new issue