Add utils for recognizing resource by uuid
[arvados-workbench2.git] / src / store / side-panel / side-panel-reducer.test.ts
index 4872a72cf750486565eeaee5f8a36b94f4dc9233..a76e33a49b0508e52e2a8e1cc60cadb2f7d2e97d 100644 (file)
@@ -7,39 +7,14 @@ import { sidePanelActions } from "./side-panel-action";
 import { ProjectsIcon } from "~/components/icon/icon";
 
 describe('side-panel-reducer', () => {
-
-    it('should toggle activity on side-panel', () => {
-        const initialState = [
-            {
-                id: "1",
-                name: "Projects",
-                icon: ProjectsIcon,
-                open: false,
-                active: false,
-            }
-        ];
-        const project = [
-            {
-                id: "1",
-                name: "Projects",
-                icon: ProjectsIcon,
-                open: false,
-                active: true,
-            }
-        ];
-
-        const state = sidePanelReducer(initialState, sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_ACTIVE(initialState[0].id));
-        expect(state).toEqual(project);
-    });
-
     it('should open side-panel item', () => {
         const initialState = [
             {
                 id: "1",
                 name: "Projects",
+                url: "/projects",
                 icon: ProjectsIcon,
-                open: false,
-                active: false,
+                open: false
             }
         ];
         const project = [
@@ -48,35 +23,11 @@ describe('side-panel-reducer', () => {
                 name: "Projects",
                 icon: ProjectsIcon,
                 open: true,
-                active: false,
+                url: "/projects"
             }
         ];
 
         const state = sidePanelReducer(initialState, sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_OPEN(initialState[0].id));
         expect(state).toEqual(project);
     });
-
-    it('should remove activity on side-panel item', () => {
-        const initialState = [
-            {
-                id: "1",
-                name: "Projects",
-                icon: ProjectsIcon,
-                open: false,
-                active: true,
-            }
-        ];
-        const project = [
-            {
-                id: "1",
-                name: "Projects",
-                icon: ProjectsIcon,
-                open: false,
-                active: false,
-            }
-        ];
-
-        const state = sidePanelReducer(initialState, sidePanelActions.RESET_SIDE_PANEL_ACTIVITY(initialState[0].id));
-        expect(state).toEqual(project);
-    });
 });