projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge-conflicts
[arvados-workbench2.git]
/
src
/
views-components
/
project-tree
/
project-tree.test.tsx
diff --git
a/src/components/project-tree/project-tree.test.tsx
b/src/views-components/project-tree/project-tree.test.tsx
similarity index 89%
rename from
src/components/project-tree/project-tree.test.tsx
rename to
src/views-components/project-tree/project-tree.test.tsx
index 932a29cc16793aede03e3dd035031cfa0a542d6b..1ba3abb8bb39ddb2c40de1098b769b35bd7ad105 100644
(file)
--- a/
src/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 CircularProgress from '@material-ui/core/CircularProgress';
import ProjectTree from './project-tree';
-import { TreeItem } from '../tree/tree';
+import { TreeItem } from '../
../components/
tree/tree';
import { Project } from '../../models/project';
Enzyme.configure({ adapter: new Adapter() });
import { Project } from '../../models/project';
Enzyme.configure({ adapter: new Adapter() });
@@
-26,13
+26,14
@@
describe("ProjectTree component", () => {
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
+ kind: 'example'
},
id: "3",
open: true,
active: true,
status: 1
};
},
id: "3",
open: true,
active: true,
status: 1
};
- const wrapper = mount(<ProjectTree projects={[project]} toggle
ProjectTreeItem={() => { }
} />);
+ const wrapper = mount(<ProjectTree projects={[project]} toggle
Open={jest.fn()} toggleActive={jest.fn()
} />);
expect(wrapper.find(ListItemIcon)).toHaveLength(1);
});
expect(wrapper.find(ListItemIcon)).toHaveLength(1);
});
@@
-47,6
+48,7
@@
describe("ProjectTree component", () => {
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
+ kind: 'example'
},
id: "3",
open: false,
},
id: "3",
open: false,
@@
-61,6
+63,7
@@
describe("ProjectTree component", () => {
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
+ kind: 'example'
},
id: "3",
open: false,
},
id: "3",
open: false,
@@
-68,7
+71,7
@@
describe("ProjectTree component", () => {
status: 1
}
];
status: 1
}
];
- const wrapper = mount(<ProjectTree projects={project} toggle
ProjectTreeItem={() => { }
} />);
+ const wrapper = mount(<ProjectTree projects={project} toggle
Open={jest.fn()} toggleActive={jest.fn()
} />);
expect(wrapper.find(ListItemIcon)).toHaveLength(2);
});
expect(wrapper.find(ListItemIcon)).toHaveLength(2);
});
@@
-83,6
+86,7
@@
describe("ProjectTree component", () => {
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
+ kind: 'example'
},
id: "3",
open: true,
},
id: "3",
open: true,
@@
-97,6
+101,7
@@
describe("ProjectTree component", () => {
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
+ kind: 'example'
},
id: "3",
open: true,
},
id: "3",
open: true,
@@
-106,7
+111,7
@@
describe("ProjectTree component", () => {
]
}
];
]
}
];
- const wrapper = mount(<ProjectTree projects={project} toggle
ProjectTreeItem={() => { }}
/>);
+ const wrapper = mount(<ProjectTree projects={project} toggle
Open={jest.fn()} toggleActive={jest.fn()}
/>);
expect(wrapper.find(Collapse)).toHaveLength(1);
});
expect(wrapper.find(Collapse)).toHaveLength(1);
});
@@
-120,13
+125,14
@@
describe("ProjectTree component", () => {
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
uuid: "uuid",
ownerUuid: "ownerUuid",
href: "href",
+ kind: 'example'
},
id: "3",
open: false,
active: true,
status: 1
};
},
id: "3",
open: false,
active: true,
status: 1
};
- const wrapper = mount(<ProjectTree projects={[project]} toggle
ProjectTreeItem={() => { }
} />);
+ const wrapper = mount(<ProjectTree projects={[project]} toggle
Open={jest.fn()} toggleActive={jest.fn()
} />);
expect(wrapper.find(CircularProgress)).toHaveLength(1);
});
expect(wrapper.find(CircularProgress)).toHaveLength(1);
});