@@ -40,7 +40,7 @@ describe('testing the bottom buttons', () => {
4040 dispatch . mockClear ( ) ;
4141 useStoreContext . mockClear ( ) ;
4242 currentTab . mode = {
43- locked : false ,
43+ // locked: false,
4444 paused : false ,
4545 persist : false ,
4646 } ;
@@ -59,32 +59,31 @@ describe('testing the bottom buttons', () => {
5959 } ) ;
6060
6161 test ( 'pause button displays state' , ( ) => {
62- expect ( wrapper . find ( '.pause-button' ) . text ( ) ) . toBe ( 'Pause ' ) ;
62+ expect ( wrapper . find ( '.pause-button' ) . text ( ) ) . toBe ( '<FontAwesomeIcon />Lock ' ) ;
6363 state . tabs [ state . currentTab ] . mode . paused = true ;
6464 wrapper = shallow ( < ButtonsContainer /> ) ;
65- expect ( wrapper . find ( '.pause-button' ) . text ( ) ) . toBe ( 'Resume' ) ;
66- } ) ;
67- } ) ;
68-
69- describe ( 'lock button testing' , ( ) => {
70- beforeEach ( ( ) => {
71- wrapper . find ( '.lock-button' ) . simulate ( 'click' ) ;
72- } ) ;
73- test ( 'lock button dispatches upon click' , ( ) => {
74- expect ( dispatch . mock . calls . length ) . toBe ( 1 ) ;
75- } ) ;
76-
77- test ( 'lock button dispatches toggleMode action' , ( ) => {
78- expect ( dispatch . mock . calls [ 0 ] [ 0 ] ) . toEqual ( toggleMode ( 'locked' ) ) ;
79- } ) ;
80-
81- test ( 'lock button displays state' , ( ) => {
82- expect ( wrapper . find ( '.lock-button' ) . text ( ) ) . toBe ( 'Lock' ) ;
83- state . tabs [ state . currentTab ] . mode . locked = true ;
84- wrapper = shallow ( < ButtonsContainer /> ) ;
85- expect ( wrapper . find ( '.lock-button' ) . text ( ) ) . toBe ( 'Unlock' ) ;
86- } ) ;
65+ expect ( wrapper . find ( '.pause-button' ) . text ( ) ) . toBe ( '<FontAwesomeIcon />Unlock' ) ;
66+ } ) ;
8767 } ) ;
68+ // describe('lock button testing', () => {
69+ // beforeEach(() => {
70+ // wrapper.find('.lock-button').simulate('click');
71+ // });
72+ // test('lock button dispatches upon click', () => {
73+ // expect(dispatch.mock.calls.length).toBe(1);
74+ // });
75+
76+ // test('lock button dispatches toggleMode action', () => {
77+ // expect(dispatch.mock.calls[0][0]).toEqual(toggleMode('locked'));
78+ // });
79+
80+ // test('lock button displays state', () => {
81+ // expect(wrapper.find('.lock-button').text()).toBe('Lock');
82+ // state.tabs[state.currentTab].mode.locked = true;
83+ // wrapper = shallow(<ButtonsContainer />);
84+ // expect(wrapper.find('.lock-button').text()).toBe('Unlock');
85+ // });
86+ // });
8887
8988 describe ( 'persist button testing' , ( ) => {
9089 beforeEach ( ( ) => {
@@ -100,10 +99,10 @@ describe('testing the bottom buttons', () => {
10099 } ) ;
101100
102101 test ( 'persist button displays state' , ( ) => {
103- expect ( wrapper . find ( '.persist-button' ) . text ( ) ) . toBe ( 'Persist' ) ;
102+ expect ( wrapper . find ( '.persist-button' ) . text ( ) ) . toBe ( '<FontAwesomeIcon /> Persist' ) ;
104103 state . tabs [ state . currentTab ] . mode . persist = true ;
105104 wrapper = shallow ( < ButtonsContainer /> ) ;
106- expect ( wrapper . find ( '.persist-button' ) . text ( ) ) . toBe ( 'Unpersist' ) ;
105+ expect ( wrapper . find ( '.persist-button' ) . text ( ) ) . toBe ( '<FontAwesomeIcon /> Unpersist' ) ;
107106 } ) ;
108107 } ) ;
109108} ) ;
0 commit comments