X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/b6a5b173cd4e9f325f371d26204dfe156d911c20..84a608e65b0f130cf57938c7c60a2c354bc14431:/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 5b9f68ff..d26d768a 100644
--- a/src/store/data-explorer/data-explorer-reducer.test.tsx
+++ b/src/store/data-explorer/data-explorer-reducer.test.tsx
@@ -12,8 +12,11 @@ describe('data-explorer-reducer', () => {
     it('should set columns', () => {
         const columns: DataColumns<any> = [{
             name: "Column 1",
+            filters: [],
             render: jest.fn(),
-            selected: true
+            selected: true,
+            configurable: true,
+            sortDirection: SortDirection.NONE
         }];
         const state = dataExplorerReducer(undefined,
             dataExplorerActions.SET_COLUMNS({ id: "Data explorer", columns }));
@@ -23,14 +26,18 @@ describe('data-explorer-reducer', () => {
     it('should toggle sorting', () => {
         const columns: DataColumns<any> = [{
             name: "Column 1",
+            filters: [],
             render: jest.fn(),
             selected: true,
-            sortDirection: SortDirection.Asc
+            sortDirection: SortDirection.ASC,
+            configurable: true
         }, {
             name: "Column 2",
+            filters: [],
             render: jest.fn(),
             selected: true,
-            sortDirection: SortDirection.None,
+            configurable: true,
+            sortDirection: SortDirection.NONE,
         }];
         const state = dataExplorerReducer({ "Data explorer": { ...initialDataExplorer, columns } },
             dataExplorerActions.TOGGLE_SORT({ id: "Data explorer", columnName: "Column 2" }));
@@ -41,8 +48,11 @@ describe('data-explorer-reducer', () => {
     it('should set filters', () => {
         const columns: DataColumns<any> = [{
             name: "Column 1",
+            filters: [],
             render: jest.fn(),
             selected: true,
+            configurable: true,
+            sortDirection: SortDirection.NONE
         }];
 
         const filters: DataTableFilterItem[] = [{
@@ -55,7 +65,7 @@ describe('data-explorer-reducer', () => {
     });
 
     it('should set items', () => {
-        const state = dataExplorerReducer({ "Data explorer": undefined },
+        const state = dataExplorerReducer({},
             dataExplorerActions.SET_ITEMS({
                 id: "Data explorer",
                 items: ["Item 1", "Item 2"],
@@ -67,13 +77,13 @@ describe('data-explorer-reducer', () => {
     });
 
     it('should set page', () => {
-        const state = dataExplorerReducer({ "Data explorer": undefined },
+        const state = dataExplorerReducer({},
             dataExplorerActions.SET_PAGE({ id: "Data explorer", page: 2 }));
         expect(state["Data explorer"].page).toEqual(2);
     });
 
     it('should set rows per page', () => {
-        const state = dataExplorerReducer({ "Data explorer": undefined },
+        const state = dataExplorerReducer({},
             dataExplorerActions.SET_ROWS_PER_PAGE({ id: "Data explorer", rowsPerPage: 5 }));
         expect(state["Data explorer"].rowsPerPage).toEqual(5);
     });
