File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
frontend/src/components/Topics/Topic/Messages/__test__ Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -74,12 +74,23 @@ describe('MessagesTable', () => {
7474 expect ( screen . queryByText ( / n e x t / i) ) . toBeDisabled ( ) ;
7575 } ) ;
7676
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+
7782 it ( 'should check if next button is disabled if there is no nextCursor' , ( ) => {
7883 ( useIsLiveMode as jest . Mock ) . mockImplementation ( ( ) => false ) ;
7984 renderComponent ( { isFetching : false } ) ;
8085 expect ( screen . queryByText ( / n e x t / i) ) . toBeDisabled ( ) ;
8186 } ) ;
8287
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+
8394 it ( 'should check the display of the loader element during loader' , ( ) => {
8495 renderComponent ( { isFetching : true } ) ;
8596 expect ( screen . getByRole ( 'progressbar' ) ) . toBeInTheDocument ( ) ;
You can’t perform that action at this time.
0 commit comments