@@ -40,7 +40,7 @@ describe('testing the bottom buttons', () => {
40
40
dispatch . mockClear ( ) ;
41
41
useStoreContext . mockClear ( ) ;
42
42
currentTab . mode = {
43
- locked : false ,
43
+ // locked: false,
44
44
paused : false ,
45
45
persist : false ,
46
46
} ;
@@ -59,32 +59,31 @@ describe('testing the bottom buttons', () => {
59
59
} ) ;
60
60
61
61
test ( 'pause button displays state' , ( ) => {
62
- expect ( wrapper . find ( '.pause-button' ) . text ( ) ) . toBe ( 'Pause ' ) ;
62
+ expect ( wrapper . find ( '.pause-button' ) . text ( ) ) . toBe ( '<FontAwesomeIcon />Lock ' ) ;
63
63
state . tabs [ state . currentTab ] . mode . paused = true ;
64
64
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
+ } ) ;
87
67
} ) ;
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
+ // });
88
87
89
88
describe ( 'persist button testing' , ( ) => {
90
89
beforeEach ( ( ) => {
@@ -100,10 +99,10 @@ describe('testing the bottom buttons', () => {
100
99
} ) ;
101
100
102
101
test ( 'persist button displays state' , ( ) => {
103
- expect ( wrapper . find ( '.persist-button' ) . text ( ) ) . toBe ( 'Persist' ) ;
102
+ expect ( wrapper . find ( '.persist-button' ) . text ( ) ) . toBe ( '<FontAwesomeIcon /> Persist' ) ;
104
103
state . tabs [ state . currentTab ] . mode . persist = true ;
105
104
wrapper = shallow ( < ButtonsContainer /> ) ;
106
- expect ( wrapper . find ( '.persist-button' ) . text ( ) ) . toBe ( 'Unpersist' ) ;
105
+ expect ( wrapper . find ( '.persist-button' ) . text ( ) ) . toBe ( '<FontAwesomeIcon /> Unpersist' ) ;
107
106
} ) ;
108
107
} ) ;
109
108
} ) ;
0 commit comments