X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/75b209b2cbd37e3510fd726e737fa5457a6a8d77..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 1ba3abb8bb..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,14 +28,14 @@ describe("ProjectTree component", () => {
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
- kind: 'example'
+ kind: ResourceKind.PROJECT
},
id: "3",
open: true,
active: true,
status: 1
};
- const wrapper = mount();
+ const wrapper = mount();
expect(wrapper.find(ListItemIcon)).toHaveLength(1);
});
@@ -48,7 +50,7 @@ describe("ProjectTree component", () => {
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
- kind: 'example'
+ kind: ResourceKind.PROJECT
},
id: "3",
open: false,
@@ -63,7 +65,7 @@ describe("ProjectTree component", () => {
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
- kind: 'example'
+ kind: ResourceKind.PROJECT
},
id: "3",
open: false,
@@ -71,7 +73,7 @@ describe("ProjectTree component", () => {
status: 1
}
];
- const wrapper = mount();
+ const wrapper = mount();
expect(wrapper.find(ListItemIcon)).toHaveLength(2);
});
@@ -86,7 +88,7 @@ describe("ProjectTree component", () => {
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
- kind: 'example'
+ kind: ResourceKind.PROJECT
},
id: "3",
open: true,
@@ -101,7 +103,7 @@ describe("ProjectTree component", () => {
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
- kind: 'example'
+ kind: ResourceKind.PROJECT
},
id: "3",
open: true,
@@ -111,7 +113,7 @@ describe("ProjectTree component", () => {
]
}
];
- const wrapper = mount();
+ const wrapper = mount();
expect(wrapper.find(Collapse)).toHaveLength(1);
});
@@ -125,14 +127,14 @@ describe("ProjectTree component", () => {
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
- kind: 'example'
+ kind: ResourceKind.PROJECT
},
id: "3",
open: false,
active: true,
status: 1
};
- const wrapper = mount();
+ const wrapper = mount();
expect(wrapper.find(CircularProgress)).toHaveLength(1);
});