[ARVADOS-WORKBENCH2] updated: 1.2.0-330-geaad304

Git user git at public.curoverse.com
Fri Sep 7 05:46:16 EDT 2018


Summary of changes:
 .../main-app-bar/main-app-bar.test.tsx             | 104 ---------------------
 1 file changed, 104 deletions(-)
 delete mode 100644 src/views-components/main-app-bar/main-app-bar.test.tsx

       via  eaad304f732e9194380786be8805cdbf355d6c46 (commit)
      from  16881157c9e5097ab8d6107a68abeb3e8d8f6d83 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit eaad304f732e9194380786be8805cdbf355d6c46
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Fri Sep 7 11:45:55 2018 +0200

    Remove main-app-bar tests
    
    Feature #14149
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>

diff --git a/src/views-components/main-app-bar/main-app-bar.test.tsx b/src/views-components/main-app-bar/main-app-bar.test.tsx
deleted file mode 100644
index 69b4dd6..0000000
--- a/src/views-components/main-app-bar/main-app-bar.test.tsx
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright (C) The Arvados Authors. All rights reserved.
-//
-// SPDX-License-Identifier: AGPL-3.0
-
-import * as React from "react";
-import { mount, configure } from "enzyme";
-import * as Adapter from "enzyme-adapter-react-16";
-import { MainAppBar, MainAppBarProps } from './main-app-bar';
-import { SearchBar } from "~/components/search-bar/search-bar";
-import { Breadcrumbs } from "~/components/breadcrumbs/breadcrumbs";
-import { DropdownMenu } from "~/components/dropdown-menu/dropdown-menu";
-import { Button, MenuItem, IconButton } from "@material-ui/core";
-import { User } from "~/models/user";
-import { MemoryRouter } from 'react-router-dom';
-
-configure({ adapter: new Adapter() });
-
-describe("<MainAppBar />", () => {
-
-    const user: User = {
-        firstName: "Test",
-        lastName: "User",
-        email: "test.user at example.com",
-        uuid: "",
-        ownerUuid: ""
-    };
-
-    it("renders all components and the menu for authenticated user if user prop has value", () => {
-        const mainAppBar = mount(
-            <MemoryRouter>
-                <MainAppBar
-                    {...mockMainAppBarProps({ user })}
-                />
-            </MemoryRouter>
-        );
-        expect(mainAppBar.find(SearchBar)).toHaveLength(1);
-        expect(mainAppBar.find(Breadcrumbs)).toHaveLength(1);
-        expect(mainAppBar.find(DropdownMenu)).toHaveLength(2);
-    });
-
-    it("renders only the menu for anonymous user if user prop is undefined", () => {
-        const menuItems = { accountMenu: [], helpMenu: [], anonymousMenu: [{ label: 'Sign in' }] };
-        const mainAppBar = mount(
-            <MemoryRouter>
-                <MainAppBar
-                    {...mockMainAppBarProps({ user: undefined, menuItems })}
-                />
-            </MemoryRouter>
-        );
-        expect(mainAppBar.find(SearchBar)).toHaveLength(0);
-        expect(mainAppBar.find(Breadcrumbs)).toHaveLength(0);
-        expect(mainAppBar.find(DropdownMenu)).toHaveLength(0);
-        expect(mainAppBar.find(Button)).toHaveLength(1);
-    });
-
-    it("communicates with <SearchBar />", () => {
-        const onSearch = jest.fn();
-        const mainAppBar = mount(
-            <MemoryRouter>
-                <MainAppBar
-                    {...mockMainAppBarProps({ searchText: 'search text', searchDebounce: 2000, onSearch, user })}
-                />
-            </MemoryRouter>
-        );
-        const searchBar = mainAppBar.find(SearchBar);
-        expect(searchBar.prop("value")).toBe("search text");
-        expect(searchBar.prop("debounce")).toBe(2000);
-        searchBar.prop("onSearch")("new search text");
-        expect(onSearch).toBeCalledWith("new search text");
-    });
-
-    it("communicates with menu", () => {
-        const onMenuItemClick = jest.fn();
-        const menuItems = { accountMenu: [{ label: "log out" }], helpMenu: [], anonymousMenu: [] };
-        const mainAppBar = mount(
-            <MemoryRouter>
-                <MainAppBar
-                    {...mockMainAppBarProps({ menuItems, onMenuItemClick, user })}
-                />
-            </MemoryRouter>
-        );
-
-        mainAppBar.find(DropdownMenu).at(0).find(IconButton).simulate("click");
-        mainAppBar.find(DropdownMenu).at(0).find(MenuItem).at(1).simulate("click");
-        expect(onMenuItemClick).toBeCalledWith(menuItems.accountMenu[0]);
-    });
-});
-
-const Breadcrumbs = () => <span>Breadcrumbs</span>;
-
-const mockMainAppBarProps = (props: Partial<MainAppBarProps>): MainAppBarProps => ({
-    searchText: '',
-    breadcrumbs: Breadcrumbs,
-    menuItems: {
-        accountMenu: [],
-        helpMenu: [],
-        anonymousMenu: [],
-    },
-    buildInfo: '',
-    onSearch: jest.fn(),
-    onMenuItemClick: jest.fn(),
-    onDetailsPanelToggle: jest.fn(),
-    ...props,
-});

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list