From ab08a8e2200157caaf73828b8459a641fff0d1e9 Mon Sep 17 00:00:00 2001 From: Janicki Artur Date: Wed, 11 Jul 2018 15:15:49 +0200 Subject: [PATCH] fix tests Feature #13764 Arvados-DCO-1.1-Signed-off-by: Janicki Artur --- src/components/dropdown-menu/dropdown-menu.test.tsx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/components/dropdown-menu/dropdown-menu.test.tsx b/src/components/dropdown-menu/dropdown-menu.test.tsx index 08f5e0f8..33964692 100644 --- a/src/components/dropdown-menu/dropdown-menu.test.tsx +++ b/src/components/dropdown-menu/dropdown-menu.test.tsx @@ -8,19 +8,18 @@ import DropdownMenu from "./dropdown-menu"; import * as Adapter from 'enzyme-adapter-react-16'; import { MenuItem, IconButton, Menu } from "@material-ui/core"; import { PaginationRightArrowIcon } from "../icon/icon"; -import ChevronRight from '@material-ui/icons/ChevronRight'; configure({ adapter: new Adapter() }); describe("", () => { it("renders menu icon", () => { - const dropdownMenu = shallow(); - expect(dropdownMenu.find(ChevronRight)).toHaveLength(1); + const dropdownMenu = shallow(} />); + expect(dropdownMenu.find(PaginationRightArrowIcon)).toHaveLength(1); }); it("render menu items", () => { const dropdownMenu = shallow( - + }> Item 1 Item 2 @@ -29,13 +28,13 @@ describe("", () => { }); it("opens on menu icon click", () => { - const dropdownMenu = shallow(); + const dropdownMenu = shallow(} />); dropdownMenu.find(IconButton).simulate("click", {currentTarget: {}}); expect(dropdownMenu.state().anchorEl).toBeDefined(); }); it("closes on menu click", () => { - const dropdownMenu = shallow(); + const dropdownMenu = shallow(} />); dropdownMenu.find(Menu).simulate("click", {currentTarget: {}}); expect(dropdownMenu.state().anchorEl).toBeUndefined(); }); -- 2.30.2