diff --git a/src/course-unit/CourseUnit.test.jsx b/src/course-unit/CourseUnit.test.jsx
index 8795f996ff..f410692dba 100644
--- a/src/course-unit/CourseUnit.test.jsx
+++ b/src/course-unit/CourseUnit.test.jsx
@@ -171,7 +171,6 @@ describe('', () => {
expect(within(unitHeaderTitle).getByRole('button', { name: headerTitleMessages.altButtonEdit.defaultMessage })).toBeInTheDocument();
expect(within(unitHeaderTitle).getByRole('button', { name: headerTitleMessages.altButtonSettings.defaultMessage })).toBeInTheDocument();
expect(screen.getByRole('button', { name: headerNavigationsMessages.viewLiveButton.defaultMessage })).toBeInTheDocument();
- expect(screen.getByRole('button', { name: headerNavigationsMessages.previewButton.defaultMessage })).toBeInTheDocument();
expect(screen.getByRole('button', { name: currentSectionName })).toBeInTheDocument();
expect(screen.getByRole('button', { name: currentSubSectionName })).toBeInTheDocument();
});
@@ -584,7 +583,6 @@ describe('', () => {
window.open = jest.fn();
render();
const {
- draft_preview_link: draftPreviewLink,
published_preview_link: publishedPreviewLink,
} = courseSectionVerticalMock;
@@ -593,11 +591,6 @@ describe('', () => {
userEvent.click(viewLiveButton);
expect(window.open).toHaveBeenCalled();
expect(window.open).toHaveBeenCalledWith(publishedPreviewLink, '_blank');
-
- const previewButton = screen.getByRole('button', { name: headerNavigationsMessages.previewButton.defaultMessage });
- userEvent.click(previewButton);
- expect(window.open).toHaveBeenCalled();
- expect(window.open).toHaveBeenCalledWith(draftPreviewLink, '_blank');
});
window.open = open;
diff --git a/src/course-unit/header-navigations/HeaderNavigations.jsx b/src/course-unit/header-navigations/HeaderNavigations.jsx
index 8fbcd7ddda..d9f7a9b734 100644
--- a/src/course-unit/header-navigations/HeaderNavigations.jsx
+++ b/src/course-unit/header-navigations/HeaderNavigations.jsx
@@ -8,25 +8,17 @@ import messages from './messages';
const HeaderNavigations = ({ headerNavigationsActions, category }) => {
const intl = useIntl();
- const { handleViewLive, handlePreview, handleEdit } = headerNavigationsActions;
+ const { handleViewLive, handleEdit } = headerNavigationsActions;
return (