Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/data/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ export const waffleFlagDefaults = {
useNewImportPage: false,
useNewExportPage: true,
useNewFilesUploadsPage: true,
useNewVideoUploadsPage: true,
useNewCourseOutlinePage: true,
useNewUnitPage: false,
useNewTextbooksPage: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useEffect } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { useLocation } from 'react-router-dom';
import { useWaffleFlags } from '@src/data/apiHooks';
import * as appHooks from '../../../hooks';
import { thunkActions, selectors } from '../../../data/redux';
import VideoSettingsModal from './VideoSettingsModal';
Expand Down Expand Up @@ -42,7 +41,6 @@ const VideoEditorModal: React.FC<Props> = ({
const isLoaded = useSelector(
(state) => selectors.requests.isFinished(state, { requestKey: RequestKeys.fetchVideos }),
);
const { useNewVideoUploadsPage } = useWaffleFlags();

useEffect(() => {
hooks.initialize(dispatch, selectedVideoId, selectedVideoUrl);
Expand All @@ -54,7 +52,6 @@ const VideoEditorModal: React.FC<Props> = ({
onReturn: onSettingsReturn,
isLibrary,
onClose,
useNewVideoUploadsPage,
}}
/>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const defaultProps = {
onReturn: jest.fn(),
isLibrary: false,
onClose: jest.fn(),
useNewVideoUploadsPage: true,
};

const renderComponent = (overrideProps = {}) => {
Expand Down Expand Up @@ -38,7 +37,7 @@ describe('<VideoSettingsModal />', () => {
window.scrollTo = jest.fn();
});

it('renders back button when useNewVideoUploadsPage is true and isLibrary is false', () => {
it('renders back button when isLibrary is false', () => {
renderComponent();
expect(screen.getByRole('button', { name: /replace video/i })).toBeInTheDocument();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,15 @@ interface Props {
onReturn: () => void;
isLibrary: boolean;
onClose?: (() => void) | null;
useNewVideoUploadsPage?: boolean;
}

const VideoSettingsModal: React.FC<Props> = ({
onReturn,
isLibrary,
onClose,
useNewVideoUploadsPage,
}) => (
<>
{!isLibrary && useNewVideoUploadsPage && (
{!isLibrary && (
<Button
variant="link"
className="text-primary-500"
Expand Down
2 changes: 0 additions & 2 deletions src/header/hooks.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ describe('header utils', () => {
it('when video upload page disabled should not include Video Uploads option', () => {
mockWaffleFlags({
enableAuthzCourseAuthoring: false,
useNewVideoUploadsPage: false,
});
jest.mocked(useCourseUserPermissions).mockReturnValue({
isLoading: false,
Expand Down Expand Up @@ -237,7 +236,6 @@ describe('header utils', () => {
beforeAll(() => {
mockWaffleFlags({
enableAuthzCourseAuthoring: false,
useNewVideoUploadsPage: false,
});
});
beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion src/header/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const useContentMenuItems = (courseId: string) => {
}] :
[]),
];
if (getConfig().ENABLE_VIDEO_UPLOAD_PAGE_LINK_IN_CONTENT_DROPDOWN === 'true' || waffleFlags.useNewVideoUploadsPage) {
if (getConfig().ENABLE_VIDEO_UPLOAD_PAGE_LINK_IN_CONTENT_DROPDOWN === 'true') {
items.push({
href: `/course/${courseId}/videos`,
title: intl.formatMessage(messages['header.links.videoUploads']),
Expand Down