From af5061d01b827d247cb0443e28294e4479190dee Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Fri, 17 Nov 2023 11:16:43 +0530 Subject: [PATCH] feat: lms live link --- .../header-navigations/HeaderNavigation.test.jsx | 7 +------ .../header-navigations/HeaderNavigations.jsx | 7 ++++--- src/course-outline/hooks.jsx | 6 ++---- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/course-outline/header-navigations/HeaderNavigation.test.jsx b/src/course-outline/header-navigations/HeaderNavigation.test.jsx index 1b83e09191..6b0fde9ca8 100644 --- a/src/course-outline/header-navigations/HeaderNavigation.test.jsx +++ b/src/course-outline/header-navigations/HeaderNavigation.test.jsx @@ -8,13 +8,12 @@ import messages from './messages'; const handleNewSectionMock = jest.fn(); const handleReIndexMock = jest.fn(); const handleExpandAllMock = jest.fn(); -const handleViewLiveMock = jest.fn(); const headerNavigationsActions = { handleNewSection: handleNewSectionMock, handleReIndex: handleReIndexMock, handleExpandAll: handleExpandAllMock, - handleViewLive: handleViewLiveMock, + lmsLink: '', }; const renderComponent = (props) => render( @@ -62,10 +61,6 @@ describe('', () => { const expandAllButton = getByRole('button', { name: messages.expandAllButton.defaultMessage }); fireEvent.click(expandAllButton); expect(handleExpandAllMock).toHaveBeenCalledTimes(1); - - const viewLiveButton = getByRole('button', { name: messages.viewLiveButton.defaultMessage }); - fireEvent.click(viewLiveButton); - expect(handleViewLiveMock).toHaveBeenCalledTimes(1); }); it('render collapse button correctly', () => { diff --git a/src/course-outline/header-navigations/HeaderNavigations.jsx b/src/course-outline/header-navigations/HeaderNavigations.jsx index 897cebf8df..c741954279 100644 --- a/src/course-outline/header-navigations/HeaderNavigations.jsx +++ b/src/course-outline/header-navigations/HeaderNavigations.jsx @@ -17,7 +17,7 @@ const HeaderNavigations = ({ }) => { const intl = useIntl(); const { - handleNewSection, handleReIndex, handleExpandAll, handleViewLive, + handleNewSection, handleReIndex, handleExpandAll, lmsLink, } = headerNavigationsActions; return ( @@ -74,7 +74,8 @@ const HeaderNavigations = ({ )} >