X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b8616dbf687fc2569c8b6252a4751f8b571457b6..2a7fd99c212c33a1ec9911f8529fa5afc59a7bb2:/src/store/data-explorer/data-explorer-reducer.test.tsx

diff --git a/src/store/data-explorer/data-explorer-reducer.test.tsx b/src/store/data-explorer/data-explorer-reducer.test.tsx
index 0bc44ba85b..01aa729633 100644
--- a/src/store/data-explorer/data-explorer-reducer.test.tsx
+++ b/src/store/data-explorer/data-explorer-reducer.test.tsx
@@ -10,13 +10,13 @@ import { SortDirection } from "../../components/data-table/data-column";
 
 describe('data-explorer-reducer', () => {
     it('should set columns', () => {
-        const columns: DataColumns<any> = [{
+        const columns: DataColumns<any, any> = [{
             name: "Column 1",
             filters: [],
             render: jest.fn(),
             selected: true,
             configurable: true,
-            sortDirection: SortDirection.NONE
+            sort: {direction: SortDirection.NONE, field: "name"}
         }];
         const state = dataExplorerReducer(undefined,
             dataExplorerActions.SET_COLUMNS({ id: "Data explorer", columns }));
@@ -24,35 +24,35 @@ describe('data-explorer-reducer', () => {
     });
 
     it('should toggle sorting', () => {
-        const columns: DataColumns<any> = [{
+        const columns: DataColumns<any, any> = [{
             name: "Column 1",
             filters: [],
             render: jest.fn(),
             selected: true,
-            configurable: true,
-            sortDirection: SortDirection.ASC
+            sort: {direction: SortDirection.ASC, field: "name"},
+            configurable: true
         }, {
             name: "Column 2",
             filters: [],
             render: jest.fn(),
             selected: true,
             configurable: true,
-            sortDirection: SortDirection.NONE,
+            sort: {direction: SortDirection.NONE, field: "name"},
         }];
         const state = dataExplorerReducer({ "Data explorer": { ...initialDataExplorer, columns } },
             dataExplorerActions.TOGGLE_SORT({ id: "Data explorer", columnName: "Column 2" }));
-        expect(state["Data explorer"].columns[0].sortDirection).toEqual("none");
-        expect(state["Data explorer"].columns[1].sortDirection).toEqual("asc");
+        expect(state["Data explorer"].columns[0].sort.direction).toEqual("none");
+        expect(state["Data explorer"].columns[1].sort.direction).toEqual("asc");
     });
 
     it('should set filters', () => {
-        const columns: DataColumns<any> = [{
+        const columns: DataColumns<any, any> = [{
             name: "Column 1",
             filters: [],
             render: jest.fn(),
             selected: true,
             configurable: true,
-            sortDirection: SortDirection.NONE
+            sort: {direction: SortDirection.NONE, field: "name"}
         }];
 
         const filters: DataTableFilterItem[] = [{
