X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/664fa00705ba7c1ee63d297afe6cdd0238c370e0..18bb503b7ba881d9c6b09446e3ecb70eb11fa17e:/src/components/dropdown-menu/dropdown-menu.test.tsx
diff --git a/src/components/dropdown-menu/dropdown-menu.test.tsx b/src/components/dropdown-menu/dropdown-menu.test.tsx
index 54957f3772..3203993903 100644
--- a/src/components/dropdown-menu/dropdown-menu.test.tsx
+++ b/src/components/dropdown-menu/dropdown-menu.test.tsx
@@ -4,24 +4,22 @@
import * as React from "react";
import { shallow, configure } from "enzyme";
-import DropdownMenu from "./dropdown-menu";
-import ChevronRightIcon from '@material-ui/icons/ChevronRight';
-
+import { DropdownMenu } from "./dropdown-menu";
import * as Adapter from 'enzyme-adapter-react-16';
import { MenuItem, IconButton, Menu } from "@material-ui/core";
-import IconBase, { IconTypes } from "../icon/icon";
+import { PaginationRightArrowIcon } from "../icon/icon";
configure({ adapter: new Adapter() });
describe("", () => {
it("renders menu icon", () => {
- const dropdownMenu = shallow();
- expect(dropdownMenu.find(IconBase)).toHaveLength(1);
+ const dropdownMenu = shallow(} />);
+ expect(dropdownMenu.find(PaginationRightArrowIcon)).toHaveLength(1);
});
it("render menu items", () => {
const dropdownMenu = shallow(
-
@@ -30,15 +28,15 @@ describe("", () => {
});
it("opens on menu icon click", () => {
- const dropdownMenu = shallow();
+ const dropdownMenu = shallow(} />);
dropdownMenu.find(IconButton).simulate("click", {currentTarget: {}});
- expect(dropdownMenu.state().anchorEl).toBeDefined();
+ expect((dropdownMenu.state() as any).anchorEl).toBeDefined();
});
-
+
it("closes on menu click", () => {
- const dropdownMenu = shallow();
+ const dropdownMenu = shallow(} />);
dropdownMenu.find(Menu).simulate("click", {currentTarget: {}});
- expect(dropdownMenu.state().anchorEl).toBeUndefined();
+ expect((dropdownMenu.state() as any).anchorEl).toBeUndefined();
});
-});
\ No newline at end of file
+});