X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/10ce16c28de952f6533ca3cc9df909269e3d2a53..2c2bd28224c2480276ae714c54ab1be0a6896efd:/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 56566da617..18efdaf88d 100644
--- a/src/views-components/project-tree/project-tree.test.tsx
+++ b/src/views-components/project-tree/project-tree.test.tsx
@@ -11,7 +11,7 @@ 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 { 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,14 +43,14 @@ 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
                     }
                 ]
             }
@@ -96,7 +70,7 @@ describe("ProjectTree component", () => {
             id: "3",
             open: false,
             active: true,
-            status: 1
+            status: TreeItemStatus.PENDING
         };
         const wrapper = mount(<ProjectTree
             projects={[project]}
