X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/ebaede5aff01400db400a3e69bb3bec2b636db3a..d1c2611350e47527730f6d3b226b998abf15a607:/src/views-components/side-panel-tree/side-panel-tree.tsx

diff --git a/src/views-components/side-panel-tree/side-panel-tree.tsx b/src/views-components/side-panel-tree/side-panel-tree.tsx
index e0d9777d..e8294834 100644
--- a/src/views-components/side-panel-tree/side-panel-tree.tsx
+++ b/src/views-components/side-panel-tree/side-panel-tree.tsx
@@ -2,20 +2,22 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import * as React from "react";
+import React from "react";
 import { Dispatch } from "redux";
 import { connect } from "react-redux";
 import { TreePicker, TreePickerProps } from "../tree-picker/tree-picker";
-import { TreeItem } from "~/components/tree/tree";
-import { ProjectResource } from "~/models/project";
-import { ListItemTextIcon } from "~/components/list-item-text-icon/list-item-text-icon";
-import { ProcessIcon, ProjectIcon, FavoriteIcon, ProjectsIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon } from '~/components/icon/icon';
-import { WorkflowIcon } from '~/components/icon/icon';
-import { activateSidePanelTreeItem, toggleSidePanelTreeItemCollapse, SIDE_PANEL_TREE, SidePanelTreeCategory } from '~/store/side-panel-tree/side-panel-tree-actions';
-import { openSidePanelContextMenu } from '~/store/context-menu/context-menu-actions';
+import { TreeItem } from "components/tree/tree";
+import { ProjectResource } from "models/project";
+import { ListItemTextIcon } from "components/list-item-text-icon/list-item-text-icon";
+import { ProcessIcon, ProjectIcon, FilterGroupIcon, FavoriteIcon, ProjectsIcon, ShareMeIcon, TrashIcon, PublicFavoriteIcon, GroupsIcon } from 'components/icon/icon';
+import { WorkflowIcon } from 'components/icon/icon';
+import { activateSidePanelTreeItem, toggleSidePanelTreeItemCollapse, SIDE_PANEL_TREE, SidePanelTreeCategory } from 'store/side-panel-tree/side-panel-tree-actions';
+import { openSidePanelContextMenu } from 'store/context-menu/context-menu-actions';
 import { noop } from 'lodash';
-import { ResourceKind } from "~/models/resource";
-import { IllegalNamingWarning } from "~/components/warning/warning";
+import { ResourceKind } from "models/resource";
+import { IllegalNamingWarning } from "components/warning/warning";
+import { GroupClass } from "models/group";
+
 export interface SidePanelTreeProps {
     onItemActivation: (id: string) => void;
     sidePanelProgress?: boolean;
@@ -39,7 +41,9 @@ const mapDispatchToProps = (dispatch: Dispatch, props: SidePanelTreeProps): Side
 
 export const SidePanelTree = connect(undefined, mapDispatchToProps)(
     (props: SidePanelTreeActionProps) =>
-        <TreePicker {...props} render={renderSidePanelItem} pickerId={SIDE_PANEL_TREE} />);
+        <span data-cy="side-panel-tree">
+        <TreePicker {...props} render={renderSidePanelItem} pickerId={SIDE_PANEL_TREE} />
+        </span>);
 
 const renderSidePanelItem = (item: TreeItem<ProjectResource>) => {
     const name = typeof item.data === 'string' ? item.data : item.data.name;
@@ -58,7 +62,9 @@ const renderSidePanelItem = (item: TreeItem<ProjectResource>) => {
 const getProjectPickerIcon = (item: TreeItem<ProjectResource | string>) =>
     typeof item.data === 'string'
         ? getSidePanelIcon(item.data)
-        : ProjectIcon;
+        : (item.data && item.data.groupClass === GroupClass.FILTER)
+            ? FilterGroupIcon
+            : ProjectIcon;
 
 const getSidePanelIcon = (category: string) => {
     switch (category) {
@@ -76,6 +82,8 @@ const getSidePanelIcon = (category: string) => {
             return PublicFavoriteIcon;
         case SidePanelTreeCategory.ALL_PROCESSES:
             return ProcessIcon;
+        case SidePanelTreeCategory.GROUPS:
+            return GroupsIcon;
         default:
             return ProjectIcon;
     }
