X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9e4b7889a99ff2f76d8029aef3a85c4620178ba3..5be1434f78d6dbcf2949918f7f042cab994ab0c5:/src/views-components/project-tree/project-tree.test.tsx

diff --git a/src/views-components/project-tree/project-tree.test.tsx b/src/views-components/project-tree/project-tree.test.tsx
index d53121304c..1a5e9f9d18 100644
--- a/src/views-components/project-tree/project-tree.test.tsx
+++ b/src/views-components/project-tree/project-tree.test.tsx
@@ -3,8 +3,8 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from 'react';
-import { mount } from 'enzyme';
 import * as Enzyme from 'enzyme';
+import { mount } from 'enzyme';
 import * as Adapter from 'enzyme-adapter-react-16';
 import ListItemIcon from '@material-ui/core/ListItemIcon';
 import { Collapse } from '@material-ui/core';
@@ -13,6 +13,8 @@ import CircularProgress from '@material-ui/core/CircularProgress';
 import ProjectTree from './project-tree';
 import { TreeItem } from '../../components/tree/tree';
 import { Project } from '../../models/project';
+import { ResourceKind } from "../../models/resource";
+
 Enzyme.configure({ adapter: new Adapter() });
 
 describe("ProjectTree component", () => {
@@ -26,13 +28,14 @@ describe("ProjectTree component", () => {
                 uuid: "uuid",
                 ownerUuid: "ownerUuid",
                 href: "href",
+                kind: ResourceKind.PROJECT
             },
             id: "3",
             open: true,
             active: true,
             status: 1
         };
-        const wrapper = mount(<ProjectTree projects={[project]} toggleProjectTreeItem={() => { }} />);
+        const wrapper = mount(<ProjectTree projects={[project]} onContextMenu={jest.fn()} toggleOpen={jest.fn()} toggleActive={jest.fn()} />);
 
         expect(wrapper.find(ListItemIcon)).toHaveLength(1);
     });
@@ -47,6 +50,7 @@ describe("ProjectTree component", () => {
                     uuid: "uuid",
                     ownerUuid: "ownerUuid",
                     href: "href",
+                    kind: ResourceKind.PROJECT
                 },
                 id: "3",
                 open: false,
@@ -61,6 +65,7 @@ describe("ProjectTree component", () => {
                     uuid: "uuid",
                     ownerUuid: "ownerUuid",
                     href: "href",
+                    kind: ResourceKind.PROJECT
                 },
                 id: "3",
                 open: false,
@@ -68,7 +73,7 @@ describe("ProjectTree component", () => {
                 status: 1
             }
         ];
-        const wrapper = mount(<ProjectTree projects={project} toggleProjectTreeItem={() => { }} />);
+        const wrapper = mount(<ProjectTree projects={project} onContextMenu={jest.fn()} toggleOpen={jest.fn()} toggleActive={jest.fn()} />);
 
         expect(wrapper.find(ListItemIcon)).toHaveLength(2);
     });
@@ -83,6 +88,7 @@ describe("ProjectTree component", () => {
                     uuid: "uuid",
                     ownerUuid: "ownerUuid",
                     href: "href",
+                    kind: ResourceKind.PROJECT
                 },
                 id: "3",
                 open: true,
@@ -97,6 +103,7 @@ describe("ProjectTree component", () => {
                             uuid: "uuid",
                             ownerUuid: "ownerUuid",
                             href: "href",
+                            kind: ResourceKind.PROJECT
                         },
                         id: "3",
                         open: true,
@@ -106,7 +113,7 @@ describe("ProjectTree component", () => {
                 ]
             }
         ];
-        const wrapper = mount(<ProjectTree projects={project} toggleProjectTreeItem={() => { }} />);
+        const wrapper = mount(<ProjectTree projects={project} onContextMenu={jest.fn()} toggleOpen={jest.fn()} toggleActive={jest.fn()}/>);
 
         expect(wrapper.find(Collapse)).toHaveLength(1);
     });
@@ -120,13 +127,14 @@ describe("ProjectTree component", () => {
                 uuid: "uuid",
                 ownerUuid: "ownerUuid",
                 href: "href",
+                kind: ResourceKind.PROJECT
             },
             id: "3",
             open: false,
             active: true,
             status: 1
         };
-        const wrapper = mount(<ProjectTree projects={[project]} toggleProjectTreeItem={() => { }} />);
+        const wrapper = mount(<ProjectTree projects={[project]} onContextMenu={jest.fn()} toggleOpen={jest.fn()} toggleActive={jest.fn()} />);
 
         expect(wrapper.find(CircularProgress)).toHaveLength(1);
     });
