[ARVADOS-WORKBENCH2] updated: 1.2.0-176-gcc493b8

Git user git at public.curoverse.com
Tue Aug 28 05:18:17 EDT 2018


Summary of changes:
 src/common/unionize.ts                             |  14 ++
 src/components/breadcrumbs/breadcrumbs.tsx         |   2 +-
 src/components/side-panel/side-panel.tsx           | 128 -----------
 src/components/tree/tree.tsx                       |   7 +-
 src/index.tsx                                      |  36 +++-
 src/models/resource.ts                             |  36 +++-
 src/models/user.ts                                 |  18 +-
 src/routes/routes.ts                               |  71 ++++++
 .../ancestors-service/ancestors-service.ts         |  44 ++++
 src/services/services.ts                           |  22 +-
 .../user-service.ts}                               |  10 +-
 src/store/auth/auth-action.ts                      |   5 +-
 src/store/breadcrumbs/breadcrumbs-actions.ts       |  46 ++++
 .../collection-panel/collection-panel-action.ts    |  23 +-
 .../collection-panel-files-actions.ts              |   4 +-
 src/store/collections/collection-copy-actions.ts   |   8 +-
 src/store/collections/collection-create-actions.ts |  14 +-
 src/store/collections/collection-move-actions.ts   |   2 +
 src/store/collections/collection-update-actions.ts |  17 +-
 .../uploader/collection-uploader-actions.ts        |   5 +-
 src/store/context-menu/context-menu-actions.ts     |  76 ++++++-
 src/store/data-explorer/data-explorer-action.ts    |   4 +-
 .../data-explorer-middleware-service.ts            |  18 ++
 src/store/details-panel/details-panel-action.ts    |  41 +---
 src/store/details-panel/details-panel-reducer.ts   |   7 +-
 src/store/dialog/dialog-actions.ts                 |   7 +-
 src/store/favorite-panel/favorite-panel-action.ts  |   2 +
 .../favorite-panel-middleware-service.ts           | 105 +++++----
 src/store/favorites/favorites-actions.ts           |   7 +-
 src/store/navigation/navigation-action.ts          | 109 ++--------
 src/store/project-panel/project-panel-action.ts    |  16 +-
 .../project-panel-middleware-service.ts            | 135 +++++++-----
 src/store/project/project-action.ts                |  39 ----
 src/store/project/project-reducer.test.ts          | 165 --------------
 src/store/project/project-reducer.ts               | 154 -------------
 src/store/projects/project-create-actions.ts       |  22 +-
 src/store/projects/project-move-actions.ts         |  17 +-
 src/store/projects/project-update-actions.ts       |  18 +-
 src/store/properties/properties-actions.ts         |  12 ++
 src/store/properties/properties-reducer.ts         |  14 ++
 src/store/properties/properties.ts                 |  23 ++
 src/store/resources/resources-actions.ts           |  31 +++
 src/store/resources/resources-reducer.ts           |  13 ++
 src/store/resources/resources.ts                   |  37 ++++
 .../side-panel-tree/side-panel-tree-actions.ts     | 162 ++++++++++++++
 src/store/side-panel/side-panel-action.ts          |  35 ++-
 src/store/side-panel/side-panel-reducer.test.ts    |  33 ---
 src/store/side-panel/side-panel-reducer.ts         | 107 ----------
 src/store/snackbar/snackbar-actions.ts             |   4 +-
 src/store/snackbar/snackbar-reducer.ts             |   2 +-
 src/store/store.ts                                 |  80 +++----
 src/store/tree-picker/tree-picker-actions.ts       |   8 +-
 src/store/tree-picker/tree-picker-reducer.ts       |  28 ++-
 src/store/tree-picker/tree-picker.ts               |   6 +-
 src/store/workbench/workbench-actions.ts           | 194 +++++++++++++++++
 src/views-components/api-token/api-token.tsx       |   6 +-
 src/views-components/breadcrumbs/breadcrumbs.ts    |  30 +++
 .../collection-panel-files.ts                      |  15 +-
 .../context-menu/action-sets/project-action-set.ts |   5 +-
 .../action-sets/root-project-action-set.ts         |   9 +-
 .../create-collection-dialog-with-selected.tsx     |  29 ---
 .../data-explorer/data-explorer.tsx                |  11 +-
 src/views-components/data-explorer/renderers.tsx   |  46 +++-
 .../details-panel/details-panel.tsx                |  22 +-
 .../dialog-forms/copy-collection-dialog.ts         |   3 +-
 .../dialog-forms/create-collection-dialog.ts       |   6 +-
 .../dialog-forms/create-project-dialog.ts          |   5 +-
 .../dialog-forms/move-collection-dialog.ts         |   3 +-
 .../dialog-forms/move-project-dialog.ts            |   2 +-
 .../dialog-forms/update-collection-dialog.ts       |   5 +-
 .../dialog-forms/update-project-dialog.ts          |   5 +-
 .../main-app-bar/main-app-bar.test.tsx             |  62 ++----
 src/views-components/main-app-bar/main-app-bar.tsx |  20 +-
 .../project-tree-picker/project-tree-picker.tsx    |   3 +-
 .../side-panel-tree/side-panel-tree.tsx            |  69 ++++++
 src/views-components/side-panel/side-panel.tsx     |  45 ++++
 src/views-components/tree-picker/tree-picker.ts    |  23 +-
 src/views/collection-panel/collection-panel.tsx    | 148 +++++++------
 src/views/favorite-panel/favorite-panel-item.ts    |  29 ---
 src/views/favorite-panel/favorite-panel.tsx        |  61 +++---
 src/views/project-panel/project-panel-item.ts      |  31 ---
 src/views/project-panel/project-panel.tsx          |  77 ++++---
 src/views/workbench/workbench.tsx                  | 237 ++-------------------
 83 files changed, 1631 insertions(+), 1619 deletions(-)
 create mode 100644 src/common/unionize.ts
 delete mode 100644 src/components/side-panel/side-panel.tsx
 create mode 100644 src/routes/routes.ts
 create mode 100644 src/services/ancestors-service/ancestors-service.ts
 copy src/services/{link-service/link-service.ts => user-service/user-service.ts} (65%)
 create mode 100644 src/store/breadcrumbs/breadcrumbs-actions.ts
 delete mode 100644 src/store/project/project-action.ts
 delete mode 100644 src/store/project/project-reducer.test.ts
 delete mode 100644 src/store/project/project-reducer.ts
 create mode 100644 src/store/properties/properties-actions.ts
 create mode 100644 src/store/properties/properties-reducer.ts
 create mode 100644 src/store/properties/properties.ts
 create mode 100644 src/store/resources/resources-actions.ts
 create mode 100644 src/store/resources/resources-reducer.ts
 create mode 100644 src/store/resources/resources.ts
 create mode 100644 src/store/side-panel-tree/side-panel-tree-actions.ts
 delete mode 100644 src/store/side-panel/side-panel-reducer.test.ts
 delete mode 100644 src/store/side-panel/side-panel-reducer.ts
 create mode 100644 src/store/workbench/workbench-actions.ts
 create mode 100644 src/views-components/breadcrumbs/breadcrumbs.ts
 delete mode 100644 src/views-components/create-collection-dialog-with-selected/create-collection-dialog-with-selected.tsx
 create mode 100644 src/views-components/side-panel-tree/side-panel-tree.tsx
 create mode 100644 src/views-components/side-panel/side-panel.tsx
 delete mode 100644 src/views/favorite-panel/favorite-panel-item.ts
 delete mode 100644 src/views/project-panel/project-panel-item.ts

       via  cc493b89840b48f40c2beaf626994724331aa196 (commit)
       via  ed7a4222422dc52642365c83cc10ab0196da909a (commit)
       via  1a90c384645ab8880d68abb5dbee1d1193f80538 (commit)
       via  ddac62fc3f788162bd56bbd5bcacc2f9395c9cca (commit)
       via  64fcf842a75ade29706401a47759deab406f0dfd (commit)
       via  cda707f957a027a484f24f44090a4e5b995572a8 (commit)
       via  b979b48045c915f0ea95bb95d591f8ac306ddf06 (commit)
       via  5627bf1a83323d2b0364cb069564998eb8c6ca7a (commit)
       via  4157d0e93444cd1d2a631e7826f8cd831863b58a (commit)
       via  c3bec339e0f247f7cbc8698120b8ecf43629d3e7 (commit)
       via  0c46a74e6c0397fa153c345857977f8654ec4471 (commit)
       via  09257d57b005094ea3752a7e90b90aa38518a0cf (commit)
       via  e6e91f83b899ef4a05a1b3af56d78388058c5e73 (commit)
       via  fc14bf232fe2cb77bf1f14ab0002fca606234214 (commit)
       via  ef649661d35999d3d6847861185172fac3e92db1 (commit)
       via  1e32e6134cd53c30cd8a9410572a443b37f76f2e (commit)
       via  1c0f11ed17dea5be97e8ca63385f979925f1fb08 (commit)
       via  d6d85de50096eb0053d58c5022fd4e949c830929 (commit)
       via  45cfc5acaa27151778f245bce76b027c06698b3d (commit)
       via  c4489d532c800a91ea66f3aaec98fc4a299e3e1e (commit)
       via  e9a65be7cd7d5889d885794bf46ac3c6277eca3c (commit)
       via  540750a7749cb71ea0a8fde4b7a3689eeaa1c3dd (commit)
       via  2df6bac4eea43c9079641cd05262b29cbd285905 (commit)
       via  6ce4e6e255691116f2c8e229d45df571dffa6b9a (commit)
      from  bef6136ae8f4e6d2ebae630940018a99946e6bda (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 cc493b89840b48f40c2beaf626994724331aa196
Merge: bef6136 ed7a422
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Tue Aug 28 11:16:41 2018 +0200

    Merge branch '14102-actions-repository'
    
    refs #14102
    
    Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski at contractors.roche.com>


commit ed7a4222422dc52642365c83cc10ab0196da909a
Author: Michal Klobukowski <michal.klobukowski at contractors.roche.com>
Date:   Tue Aug 28 11:16:10 2018 +0200

    Update main-app-bar tests
    
    Feature #14102
    
    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
index 75a39fd..030fb35 100644
--- a/src/views-components/main-app-bar/main-app-bar.test.tsx
+++ b/src/views-components/main-app-bar/main-app-bar.test.tsx
@@ -5,7 +5,7 @@
 import * as React from "react";
 import { mount, configure } from "enzyme";
 import * as Adapter from "enzyme-adapter-react-16";
-import { MainAppBar } from "./main-app-bar";
+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";
@@ -27,10 +27,7 @@ describe("<MainAppBar />", () => {
     it("renders all components and the menu for authenticated user if user prop has value", () => {
         const mainAppBar = mount(
             <MainAppBar
-                user={user}
-                onContextMenu={jest.fn()}
-                onDetailsPanelToggle={jest.fn()}
-                {...{ searchText: "", breadcrumbs: [], menuItems: { accountMenu: [], helpMenu: [], anonymousMenu: [] }, onSearch: jest.fn(), onBreadcrumbClick: jest.fn(), onMenuItemClick: jest.fn() }}
+                {...mockMainAppBarProps({ user })}
             />
         );
         expect(mainAppBar.find(SearchBar)).toHaveLength(1);
@@ -42,10 +39,7 @@ describe("<MainAppBar />", () => {
         const menuItems = { accountMenu: [], helpMenu: [], anonymousMenu: [{ label: 'Sign in' }] };
         const mainAppBar = mount(
             <MainAppBar
-                menuItems={menuItems}
-                onDetailsPanelToggle={jest.fn()}
-                onContextMenu={jest.fn()}
-                {...{ searchText: "", breadcrumbs: [], onSearch: jest.fn(), onBreadcrumbClick: jest.fn(), onMenuItemClick: jest.fn() }}
+                {...mockMainAppBarProps({ user: undefined, menuItems })}
             />
         );
         expect(mainAppBar.find(SearchBar)).toHaveLength(0);
@@ -58,12 +52,7 @@ describe("<MainAppBar />", () => {
         const onSearch = jest.fn();
         const mainAppBar = mount(
             <MainAppBar
-                searchText="search text"
-                searchDebounce={2000}
-                onContextMenu={jest.fn()}
-                onSearch={onSearch}
-                onDetailsPanelToggle={jest.fn()}
-                {...{ user, breadcrumbs: [], menuItems: { accountMenu: [], helpMenu: [], anonymousMenu: [] }, onBreadcrumbClick: jest.fn(), onMenuItemClick: jest.fn() }}
+                {...mockMainAppBarProps({ searchText: 'search text', searchDebounce: 2000, onSearch, user })}
             />
         );
         const searchBar = mainAppBar.find(SearchBar);
@@ -73,34 +62,12 @@ describe("<MainAppBar />", () => {
         expect(onSearch).toBeCalledWith("new search text");
     });
 
-    it("communicates with <Breadcrumbs />", () => {
-        const items = [{ label: "breadcrumb 1" }];
-        const onBreadcrumbClick = jest.fn();
-        const mainAppBar = mount(
-            <MainAppBar
-                breadcrumbs={items}
-                onContextMenu={jest.fn()}
-                onBreadcrumbClick={onBreadcrumbClick}
-                onDetailsPanelToggle={jest.fn()}
-                {...{ user, searchText: "", menuItems: { accountMenu: [], helpMenu: [], anonymousMenu: [] }, onSearch: jest.fn(), onMenuItemClick: jest.fn() }}
-            />
-        );
-        const breadcrumbs = mainAppBar.find(Breadcrumbs);
-        expect(breadcrumbs.prop("items")).toBe(items);
-        breadcrumbs.prop("onClick")(items[0]);
-        expect(onBreadcrumbClick).toBeCalledWith(items[0]);
-    });
-
     it("communicates with menu", () => {
         const onMenuItemClick = jest.fn();
-        const menuItems = { accountMenu: [{label: "log out"}], helpMenu: [], anonymousMenu: [] };
+        const menuItems = { accountMenu: [{ label: "log out" }], helpMenu: [], anonymousMenu: [] };
         const mainAppBar = mount(
             <MainAppBar
-                menuItems={menuItems}
-                onContextMenu={jest.fn()}
-                onMenuItemClick={onMenuItemClick}
-                onDetailsPanelToggle={jest.fn()}
-                {...{ user, searchText: "", breadcrumbs: [], onSearch: jest.fn(), onBreadcrumbClick: jest.fn() }}
+                {...mockMainAppBarProps({ menuItems, onMenuItemClick, user })}
             />
         );
 
@@ -109,3 +76,20 @@ describe("<MainAppBar />", () => {
         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,
+});
diff --git a/src/views-components/main-app-bar/main-app-bar.tsx b/src/views-components/main-app-bar/main-app-bar.tsx
index 73a8608..de6be7e 100644
--- a/src/views-components/main-app-bar/main-app-bar.tsx
+++ b/src/views-components/main-app-bar/main-app-bar.tsx
@@ -6,7 +6,6 @@ import * as React from "react";
 import { AppBar, Toolbar, Typography, Grid, IconButton, Badge, Button, MenuItem } from "@material-ui/core";
 import { User, getUserFullname } from "~/models/user";
 import { SearchBar } from "~/components/search-bar/search-bar";
-import { Breadcrumbs, Breadcrumb } from "~/components/breadcrumbs/breadcrumbs";
 import { DropdownMenu } from "~/components/dropdown-menu/dropdown-menu";
 import { DetailsIcon, NotificationIcon, UserPanelIcon, HelpIcon } from "~/components/icon/icon";
 
@@ -35,7 +34,7 @@ export interface MainAppBarActionProps {
     onDetailsPanelToggle: () => void;
 }
 
-type MainAppBarProps = MainAppBarDataProps & MainAppBarActionProps;
+export type MainAppBarProps = MainAppBarDataProps & MainAppBarActionProps;
 
 export const MainAppBar: React.SFC<MainAppBarProps> = (props) => {
     return <AppBar position="static">

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list