File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -87,14 +87,14 @@ describe('unit testing for Action.tsx', () => {
87
87
test ( 'Clicking the snapshot should trigger onClick' , ( ) => {
88
88
render ( < Action { ...props } /> ) ;
89
89
fireEvent . click ( screen . getByRole ( 'presentation' ) ) ;
90
- expect ( props . dispatch ) . toHaveBeenCalledWith ( changeView ( 2 ) ) ; ;
90
+ expect ( props . dispatch ) . toHaveBeenCalledWith ( changeView ( props . index ) ) ; ;
91
91
} ) ;
92
92
93
93
test ( 'Clicking Jump button should trigger changeSlider and changeView' , ( ) => {
94
94
render ( < Action { ...props } /> ) ;
95
95
fireEvent . click ( screen . getAllByRole ( 'button' ) [ 1 ] ) ;
96
- expect ( props . dispatch ) . toHaveBeenCalledWith ( changeSlider ( 2 ) ) ;
97
- expect ( props . dispatch ) . toHaveBeenCalledWith ( changeView ( 2 ) ) ;
96
+ expect ( props . dispatch ) . toHaveBeenCalledWith ( changeSlider ( props . index ) ) ;
97
+ expect ( props . dispatch ) . toHaveBeenCalledWith ( changeView ( props . index ) ) ;
98
98
} ) ;
99
99
} ) ;
100
100
} ) ;
You can’t perform that action at this time.
0 commit comments