X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/1c7242e61e9d71c7a37483ec0583dd0256f8ee7e..bf8c821490525bc063ffcc9ceeef06c525696e0c:/src/components/tree/tree.test.tsx

diff --git a/src/components/tree/tree.test.tsx b/src/components/tree/tree.test.tsx
index 1db379f9..a153ec06 100644
--- a/src/components/tree/tree.test.tsx
+++ b/src/components/tree/tree.test.tsx
@@ -7,10 +7,10 @@ import * as Enzyme from 'enzyme';
 import * as Adapter from 'enzyme-adapter-react-16';
 import ListItem from "@material-ui/core/ListItem/ListItem";
 
-import { Tree, TreeItem } from './tree';
+import { Tree, TreeItem, TreeItemStatus } from './tree';
 import { ProjectResource } from '../../models/project';
 import { mockProjectResource } from '../../models/test-utils';
-import { Checkbox } from '../../../node_modules/@material-ui/core';
+import { Checkbox } from '@material-ui/core';
 
 Enzyme.configure({ adapter: new Adapter() });
 
@@ -22,7 +22,7 @@ describe("Tree component", () => {
             id: "3",
             open: true,
             active: true,
-            status: 1,
+            status: TreeItemStatus.LOADED
         };
         const wrapper = mount(<Tree
             render={project => <div />}
@@ -39,7 +39,7 @@ describe("Tree component", () => {
             id: "3",
             open: true,
             active: true,
-            status: 1,
+            status: TreeItemStatus.LOADED,
         };
         const wrapper = mount(<Tree
             render={project => <div />}
@@ -56,7 +56,7 @@ describe("Tree component", () => {
             id: "3",
             open: true,
             active: true,
-            status: 1,
+            status: TreeItemStatus.LOADED
         };
         const wrapper = mount(<Tree
             showSelection={true}
@@ -74,7 +74,7 @@ describe("Tree component", () => {
             id: "3",
             open: true,
             active: true,
-            status: 1,
+            status: TreeItemStatus.LOADED,
         };
         const spy = jest.fn();
         const onSelectionChanged = (event: any, item: TreeItem<any>) => spy(item);
@@ -84,15 +84,15 @@ describe("Tree component", () => {
             toggleItemOpen={jest.fn()}
             toggleItemActive={jest.fn()}
             onContextMenu={jest.fn()}
-            onSelectionChange={onSelectionChanged}
+            toggleItemSelection={onSelectionChanged}
             items={[project]} />);
-        wrapper.find(Checkbox).prop('onClick')();
+        wrapper.find(Checkbox).simulate('click');
         expect(spy).toHaveBeenLastCalledWith({
             data: mockProjectResource(),
             id: "3",
             open: true,
             active: true,
-            status: 1,
+            status: TreeItemStatus.LOADED,
         });
     });
 
