@@ -24,7 +24,7 @@ describe('Unit testing for ButtonContainer', () => {
24
24
sliderIndex : 0 ,
25
25
viewIndex : - 1 ,
26
26
mode : {
27
- paused : false ,
27
+ paused : true ,
28
28
locked : false ,
29
29
} ,
30
30
} ,
@@ -45,15 +45,16 @@ describe('Unit testing for ButtonContainer', () => {
45
45
dispatch . mockClear ( ) ;
46
46
mockedUsedStoreContext . mockClear ( ) ;
47
47
currentTab . mode = {
48
- paused : false ,
48
+ paused : true ,
49
+ persist : false ,
49
50
} ;
50
51
} ) ;
51
52
52
53
describe ( 'When button container is loaded' , ( ) => {
53
54
test ( 'should have 4 buttons ' , ( ) => {
54
55
render ( < ButtonsContainer /> ) ;
55
56
expect ( screen . getAllByRole ( 'button' ) ) . toHaveLength ( 4 ) ;
56
- expect ( screen . getAllByRole ( 'button' ) [ 0 ] ) . toHaveTextContent ( 'Unlocked ' ) ;
57
+ expect ( screen . getAllByRole ( 'button' ) [ 0 ] ) . toHaveTextContent ( 'Locked ' ) ;
57
58
expect ( screen . getAllByRole ( 'button' ) [ 1 ] ) . toHaveTextContent ( 'Download' ) ;
58
59
expect ( screen . getAllByRole ( 'button' ) [ 2 ] ) . toHaveTextContent ( 'Upload' ) ;
59
60
expect ( screen . getAllByRole ( 'button' ) [ 3 ] ) . toHaveTextContent ( 'Tutorial' ) ;
@@ -62,9 +63,9 @@ describe('Unit testing for ButtonContainer', () => {
62
63
63
64
describe ( 'When view is unlock' , ( ) => {
64
65
test ( 'Button should show as unlocked' , ( ) => {
65
- state . tabs [ '87' ] . mode . paused = true ;
66
+ state . tabs [ '87' ] . mode . paused = false ;
66
67
render ( < ButtonsContainer /> ) ;
67
- expect ( screen . getAllByRole ( 'button' ) [ 0 ] ) . toHaveTextContent ( 'Locked ' ) ;
68
+ expect ( screen . getAllByRole ( 'button' ) [ 0 ] ) . toHaveTextContent ( 'Unlocked ' ) ;
68
69
} ) ;
69
70
} ) ;
70
71
0 commit comments