X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/a886877017be6744b38d84d52503d21892704139..6ff11e5f5dba8e02a176bbe9455ba916e8990028:/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 d53f8a9e..18efdaf8 100644
--- a/src/views-components/project-tree/project-tree.test.tsx
+++ b/src/views-components/project-tree/project-tree.test.tsx
@@ -10,8 +10,8 @@ import ListItemIcon from '@material-ui/core/ListItemIcon';
 import { Collapse } from '@material-ui/core';
 import CircularProgress from '@material-ui/core/CircularProgress';
 
-import ProjectTree from './project-tree';
-import { TreeItem } from '../../components/tree/tree';
+import { ProjectTree } from './project-tree';
+import { TreeItem, TreeItemStatus } from '../../components/tree/tree';
 import { ProjectResource } from '../../models/project';
 import { mockProjectResource } from '../../models/test-utils';
 
@@ -25,7 +25,7 @@ describe("ProjectTree component", () => {
             id: "3",
             open: true,
             active: true,
-            status: 1
+            status: TreeItemStatus.PENDING
         };
         const wrapper = mount(<ProjectTree
             projects={[project]}
@@ -33,32 +33,6 @@ describe("ProjectTree component", () => {
             toggleActive={jest.fn()}
             onContextMenu={jest.fn()} />);
 
-        expect(wrapper.find(ListItemIcon)).toHaveLength(1);
-    });
-
-    it("should render 2 ListItemIcons", () => {
-        const project: Array<TreeItem<ProjectResource>> = [
-            {
-                data: mockProjectResource(),
-                id: "3",
-                open: false,
-                active: true,
-                status: 1
-            },
-            {
-                data: mockProjectResource(),
-                id: "3",
-                open: false,
-                active: true,
-                status: 1
-            }
-        ];
-        const wrapper = mount(<ProjectTree
-            projects={project}
-            toggleOpen={jest.fn()}
-            toggleActive={jest.fn()}
-            onContextMenu={jest.fn()} />);
-
         expect(wrapper.find(ListItemIcon)).toHaveLength(2);
     });
 
@@ -69,21 +43,21 @@ describe("ProjectTree component", () => {
                 id: "3",
                 open: true,
                 active: true,
-                status: 2,
+                status: TreeItemStatus.LOADED,
                 items: [
                     {
                         data: mockProjectResource(),
                         id: "3",
                         open: true,
                         active: true,
-                        status: 1
+                        status: TreeItemStatus.PENDING
                     }
                 ]
             }
         ];
-        const wrapper = mount(<ProjectTree 
-            projects={project} 
-            toggleOpen={jest.fn()} 
+        const wrapper = mount(<ProjectTree
+            projects={project}
+            toggleOpen={jest.fn()}
             toggleActive={jest.fn()}
             onContextMenu={jest.fn()} />);
 
@@ -96,11 +70,11 @@ describe("ProjectTree component", () => {
             id: "3",
             open: false,
             active: true,
-            status: 1
+            status: TreeItemStatus.PENDING
         };
-        const wrapper = mount(<ProjectTree 
-            projects={[project]} 
-            toggleOpen={jest.fn()} 
+        const wrapper = mount(<ProjectTree
+            projects={[project]}
+            toggleOpen={jest.fn()}
             toggleActive={jest.fn()}
             onContextMenu={jest.fn()} />);
 
