File tree 1 file changed +11
-0
lines changed
frontend/src/components/Topics/Topic/Messages/__test__
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -74,12 +74,23 @@ describe('MessagesTable', () => {
74
74
expect ( screen . queryByText ( / n e x t / i) ) . toBeDisabled ( ) ;
75
75
} ) ;
76
76
77
+ it ( 'should check if previous button is disabled isLive Param' , ( ) => {
78
+ renderComponent ( { isFetching : true } ) ;
79
+ expect ( screen . queryByText ( / p r e v i o u s / i) ) . toBeDisabled ( ) ;
80
+ } ) ;
81
+
77
82
it ( 'should check if next button is disabled if there is no nextCursor' , ( ) => {
78
83
( useIsLiveMode as jest . Mock ) . mockImplementation ( ( ) => false ) ;
79
84
renderComponent ( { isFetching : false } ) ;
80
85
expect ( screen . queryByText ( / n e x t / i) ) . toBeDisabled ( ) ;
81
86
} ) ;
82
87
88
+ it ( 'should check if previous button is disabled if there is no prevCursor' , ( ) => {
89
+ ( useIsLiveMode as jest . Mock ) . mockImplementation ( ( ) => false ) ;
90
+ renderComponent ( { isFetching : false } ) ;
91
+ expect ( screen . queryByText ( / p r e v i o u s / i) ) . toBeDisabled ( ) ;
92
+ } ) ;
93
+
83
94
it ( 'should check the display of the loader element during loader' , ( ) => {
84
95
renderComponent ( { isFetching : true } ) ;
85
96
expect ( screen . getByRole ( 'progressbar' ) ) . toBeInTheDocument ( ) ;
You can’t perform that action at this time.
0 commit comments