Skip to content

Commit 3b0be94

Browse files
committed
fix: solve rebase issues
1 parent 0c86a39 commit 3b0be94

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/editors/sharedComponents/TinyMceWidget/hooks.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,13 @@ describe('TinyMceEditor hooks', () => {
228228
const actual = await module.replaceStaticWithAsset({ initialContent: content, learningContextId });
229229
expect(actual).toBeFalsy();
230230
});
231-
it('does not convert static URLs with subdirectories but converts direct static files', () => {
231+
it('does not convert static URLs with subdirectories but converts direct static files', async () => {
232232
const contentWithSubdirectory = '<img src="/static/images/placeholder-faculty.png"/><img src="/static/example.jpg"/>';
233233
const expected = `<img src="/static/images/placeholder-faculty.png"/><img src="/${baseAssetUrl}@example.jpg"/>`;
234-
const actual = module.replaceStaticWithAsset({
234+
const actual = await module.replaceStaticWithAsset({
235235
initialContent: contentWithSubdirectory,
236236
learningContextId,
237+
validateAssetUrl: false,
237238
});
238239
expect(actual).toEqual(expected);
239240
});

src/editors/sharedComponents/TinyMceWidget/hooks.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,6 @@ export const setupCustomBehavior = ({
389389
editor.on('ExecCommand', /* istanbul ignore next */ async (e) => {
390390
if (editorType === 'text' && e.command === 'mceFocus') {
391391
const initialContent = editor.getContent();
392-
// @ts-ignore Some parameters like 'lmsEndpointUrl' were missing here. Fix me?
393392
const newContent = await replaceStaticWithAsset({
394393
initialContent,
395394
editorType,

src/schedule-and-details/index.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
} from '@openedx/paragon/icons';
1010
import { useIntl } from '@edx/frontend-platform/i18n';
1111

12+
import { useCourseAuthoringContext } from '@src/CourseAuthoringContext';
1213
import Placeholder from '../editors/Placeholder';
1314
import { RequestStatus } from '../data/constants';
1415
import { useGetCourseDetails } from './data/apiHooks';
@@ -17,7 +18,6 @@ import InternetConnectionAlert from '../generic/internet-connection-alert';
1718
import { STATEFUL_BUTTON_STATES } from '../constants';
1819
import getPageHeadTitle from '../generic/utils';
1920
import { useScrollToHashElement } from '../hooks';
20-
import { useCourseAuthoringContext } from '@src/CourseAuthoringContext';
2121
import {
2222
fetchCourseSettingsQuery,
2323
updateCourseDetailsQuery,
@@ -42,15 +42,15 @@ import { useLoadValuesPrompt, useSaveValuesPrompt } from './hooks';
4242

4343
const ScheduleAndDetails = () => {
4444
const intl = useIntl();
45-
const courseDetails = useGetCourseDetails(courseId);
4645
const courseSettings = useSelector(getCourseSettings);
4746
const loadingSettingsStatus = useSelector(getLoadingSettingsStatus);
48-
const isLoading = courseDetails.isLoading
49-
|| loadingSettingsStatus === RequestStatus.IN_PROGRESS;
50-
5147
const { courseId, courseDetails: course } = useCourseAuthoringContext();
5248
document.title = getPageHeadTitle(course?.name || '', intl.formatMessage(messages.headingTitle));
5349

50+
const courseDetails = useGetCourseDetails(courseId);
51+
const isLoading = courseDetails.isLoading
52+
|| loadingSettingsStatus === RequestStatus.IN_PROGRESS;
53+
5454
const {
5555
platformName,
5656
isCreditCourse,

0 commit comments

Comments
 (0)