[ARVADOS-WORKBENCH2] updated: 1.3.0-326-gfe477581

Git user git at public.curoverse.com
Wed Jan 2 03:28:13 EST 2019


Summary of changes:
 src/components/data-explorer/data-explorer.test.tsx      | 9 +++++----
 src/store/data-explorer/data-explorer-middleware.test.ts | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

       via  fe477581df706f4c2c1669f2df584bd94dbb4bea (commit)
      from  9d13b7b84e145646fe3d5e61e26a2ceead76d039 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit fe477581df706f4c2c1669f2df584bd94dbb4bea
Author: Daniel Kos <daniel.kos at contractors.roche.com>
Date:   Wed Jan 2 09:28:10 2019 +0100

    Fix test passing
    
    No issue #
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos at contractors.roche.com>

diff --git a/src/components/data-explorer/data-explorer.test.tsx b/src/components/data-explorer/data-explorer.test.tsx
index d74b5319..1d8738ab 100644
--- a/src/components/data-explorer/data-explorer.test.tsx
+++ b/src/components/data-explorer/data-explorer.test.tsx
@@ -8,11 +8,10 @@ import * as Adapter from 'enzyme-adapter-react-16';
 
 import { DataExplorer } from "./data-explorer";
 import { ColumnSelector } from "../column-selector/column-selector";
-import { DataTable } from "../data-table/data-table";
+import { DataTable, DataTableFetchMode } from "../data-table/data-table";
 import { SearchInput } from "../search-input/search-input";
 import { TablePagination } from "@material-ui/core";
 import { ProjectIcon } from '../icon/icon';
-import { DefaultView } from '../default-view/default-view';
 import { SortDirection } from '../data-table/data-column';
 
 configure({ adapter: new Adapter() });
@@ -36,7 +35,7 @@ describe("<DataExplorer />", () => {
     it("communicates with <ColumnSelector/>", () => {
         const onColumnToggle = jest.fn();
         const onSetColumns = jest.fn();
-        const columns = [{ name: "Column 1", render: jest.fn(), selected: true, configurable: true, sortDirection: SortDirection.ASC, filters: [] }];
+        const columns = [{ name: "Column 1", render: jest.fn(), selected: true, configurable: true, sortDirection: SortDirection.ASC, filters: {} }];
         const dataExplorer = mount(<DataExplorer
             {...mockDataExplorerProps()}
             columns={columns}
@@ -53,7 +52,7 @@ describe("<DataExplorer />", () => {
         const onSortToggle = jest.fn();
         const onRowClick = jest.fn();
         const onSetColumns = jest.fn();
-        const columns = [{ name: "Column 1", render: jest.fn(), selected: true, configurable: true, sortDirection: SortDirection.ASC, filters: [] }];
+        const columns = [{ name: "Column 1", render: jest.fn(), selected: true, configurable: true, sortDirection: SortDirection.ASC, filters: {} }];
         const items = [{ name: "item 1" }];
         const dataExplorer = mount(<DataExplorer
             {...mockDataExplorerProps()}
@@ -95,6 +94,7 @@ describe("<DataExplorer />", () => {
 });
 
 const mockDataExplorerProps = () => ({
+    fetchMode: DataTableFetchMode.PAGINATED,
     columns: [],
     items: [],
     itemsAvailable: 0,
@@ -114,6 +114,7 @@ const mockDataExplorerProps = () => ({
     onContextMenu: jest.fn(),
     defaultIcon: ProjectIcon,
     onSetColumns: jest.fn(),
+    onLoadMore: jest.fn(),
     defaultMessages: ['testing'],
     contextMenuColumn: true
 });
diff --git a/src/store/data-explorer/data-explorer-middleware.test.ts b/src/store/data-explorer/data-explorer-middleware.test.ts
index 00931bf8..5d729ce2 100644
--- a/src/store/data-explorer/data-explorer-middleware.test.ts
+++ b/src/store/data-explorer/data-explorer-middleware.test.ts
@@ -38,7 +38,7 @@ describe("DataExplorerMiddleware", () => {
         middleware(dataExplorerActions.SET_PAGE({ id: "OtherId", page: 0 }));
         middleware(dataExplorerActions.SET_PAGE({ id: "ServiceId", page: 0 }));
         middleware(dataExplorerActions.SET_PAGE({ id: "OtherId", page: 0 }));
-        expect(api.dispatch).toHaveBeenCalledWith(dataExplorerActions.REQUEST_ITEMS({ id: "ServiceId" }));
+        expect(api.dispatch).toHaveBeenCalledWith(dataExplorerActions.REQUEST_ITEMS({ id: "ServiceId", criteriaChanged: false }));
         expect(api.dispatch).toHaveBeenCalledTimes(1);
     });
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list