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 actions from "./side-panel-action";
8 describe('side-panel-reducer', () => {
10 it('should toggle activity on side-panel', () => {
11 const initialState = [
15 icon: "fas fa-th fa-fw",
24 icon: "fas fa-th fa-fw",
30 const state = sidePanelReducer(initialState, actions.TOGGLE_SIDE_PANEL_ITEM_ACTIVE(initialState[0].id));
31 expect(state).toEqual(project);
34 it('should open side-panel item', () => {
35 const initialState = [
39 icon: "fas fa-th fa-fw",
48 icon: "fas fa-th fa-fw",
54 const state = sidePanelReducer(initialState, actions.TOGGLE_SIDE_PANEL_ITEM_OPEN(initialState[0].id));
55 expect(state).toEqual(project);
58 it('should remove activity on side-panel item', () => {
59 const initialState = [
63 icon: "fas fa-th fa-fw",
72 icon: "fas fa-th fa-fw",
78 const state = sidePanelReducer(initialState, actions.RESET_SIDE_PANEL_ACTIVITY(initialState[0].id));
79 expect(state).toEqual(project);