1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { sidePanelReducer } from "./side-panel-reducer";
6 import { sidePanelActions } from "./side-panel-action";
7 import { ProjectsIcon } from "../../components/icon/icon";
9 describe('side-panel-reducer', () => {
11 it('should toggle activity on side-panel', () => {
12 const initialState = [
31 const state = sidePanelReducer(initialState, sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_ACTIVE(initialState[0].id));
32 expect(state).toEqual(project);
35 it('should open side-panel item', () => {
36 const initialState = [
55 const state = sidePanelReducer(initialState, sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_OPEN(initialState[0].id));
56 expect(state).toEqual(project);
59 it('should remove activity on side-panel item', () => {
60 const initialState = [
79 const state = sidePanelReducer(initialState, sidePanelActions.RESET_SIDE_PANEL_ACTIVITY(initialState[0].id));
80 expect(state).toEqual(project);