Merge pull request #326 from open-craft/chris/FAL-3383-new-video-editor-flow
[FAL-3383] Implement new video UX flow on new video editor
This commit is contained in:
@@ -26,8 +26,7 @@ jest.mock('./urls', () => ({
|
||||
courseAdvanceSettings: jest.fn().mockName('urls.courseAdvanceSettings'),
|
||||
replaceTranscript: jest.fn().mockName('urls.replaceTranscript'),
|
||||
videoFeatures: jest.fn().mockName('urls.videoFeatures'),
|
||||
courseVideos: jest.fn().mockName('urls.courseVideos'),
|
||||
videoUpload: jest.fn()
|
||||
courseVideos: jest.fn()
|
||||
.mockName('urls.courseVideos')
|
||||
.mockImplementation(
|
||||
({ studioEndpointUrl, learningContextId }) => `${studioEndpointUrl}/some_video_upload_url/${learningContextId}`,
|
||||
|
||||
@@ -43,6 +43,10 @@ export const downloadVideoTranscriptURL = ({ studioEndpointUrl, blockId, languag
|
||||
`${videoTranscripts({ studioEndpointUrl, blockId })}?language_code=${language}`
|
||||
);
|
||||
|
||||
export const mediaTranscriptURL = ({ studioEndpointUrl, transcriptUrl }) => (
|
||||
`${studioEndpointUrl}${transcriptUrl}`
|
||||
);
|
||||
|
||||
export const downloadVideoHandoutUrl = ({ studioEndpointUrl, handout }) => (
|
||||
`${studioEndpointUrl}${handout}`
|
||||
);
|
||||
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
checkTranscriptsForImport,
|
||||
replaceTranscript,
|
||||
courseAdvanceSettings,
|
||||
mediaTranscriptURL,
|
||||
videoFeatures,
|
||||
courseVideos,
|
||||
} from './urls';
|
||||
@@ -145,4 +146,11 @@ describe('cms url methods', () => {
|
||||
.toEqual(`${studioEndpointUrl}/videos/${learningContextId}`);
|
||||
});
|
||||
});
|
||||
describe('mediaTranscriptURL', () => {
|
||||
it('returns url with studioEndpointUrl', () => {
|
||||
const transcriptUrl = 'this-is-a-transcript';
|
||||
expect(mediaTranscriptURL({ studioEndpointUrl, transcriptUrl }))
|
||||
.toEqual(`${studioEndpointUrl}${transcriptUrl}`);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user