diff --git a/frontend/src/components/Topics/Topic/Messages/__test__/MessagesTable.spec.tsx b/frontend/src/components/Topics/Topic/Messages/__test__/MessagesTable.spec.tsx index 2e348b4f5..4e1c002f3 100644 --- a/frontend/src/components/Topics/Topic/Messages/__test__/MessagesTable.spec.tsx +++ b/frontend/src/components/Topics/Topic/Messages/__test__/MessagesTable.spec.tsx @@ -74,12 +74,23 @@ describe('MessagesTable', () => { expect(screen.queryByText(/next/i)).toBeDisabled(); }); + it('should check if previous button is disabled isLive Param', () => { + renderComponent({ isFetching: true }); + expect(screen.queryByText(/previous/i)).toBeDisabled(); + }); + it('should check if next button is disabled if there is no nextCursor', () => { (useIsLiveMode as jest.Mock).mockImplementation(() => false); renderComponent({ isFetching: false }); expect(screen.queryByText(/next/i)).toBeDisabled(); }); + it('should check if previous button is disabled if there is no prevCursor', () => { + (useIsLiveMode as jest.Mock).mockImplementation(() => false); + renderComponent({ isFetching: false }); + expect(screen.queryByText(/previous/i)).toBeDisabled(); + }); + it('should check the display of the loader element during loader', () => { renderComponent({ isFetching: true }); expect(screen.getByRole('progressbar')).toBeInTheDocument();