fix: remove an extra editing xblock modal on unit page (#2111)
This commit is contained in:
@@ -720,12 +720,6 @@ describe('<CourseUnit />', () => {
|
||||
userEvent.click(problemButton);
|
||||
});
|
||||
|
||||
await waitFor(() => {
|
||||
expect(screen.getByRole('heading', {
|
||||
name: new RegExp(`${addComponentMessages.blockEditorModalTitle.defaultMessage}`, 'i'),
|
||||
})).toBeInTheDocument();
|
||||
});
|
||||
|
||||
axiosMock
|
||||
.onGet(getCourseSectionVerticalApiUrl(blockId))
|
||||
.reply(200, courseSectionVerticalMock);
|
||||
|
||||
@@ -254,13 +254,7 @@ const AddComponent = ({
|
||||
/>
|
||||
</div>
|
||||
</StandardModal>
|
||||
<StandardModal
|
||||
title={intl.formatMessage(messages.blockEditorModalTitle)}
|
||||
isOpen={isXBlockEditorModalOpen}
|
||||
onClose={closeXBlockEditorModal}
|
||||
isOverflowVisible={false}
|
||||
size="xl"
|
||||
>
|
||||
{isXBlockEditorModalOpen && (
|
||||
<div className="editor-page">
|
||||
<EditorPage
|
||||
courseId={courseId}
|
||||
@@ -272,7 +266,7 @@ const AddComponent = ({
|
||||
returnFunction={/* istanbul ignore next */ () => onXBlockSave}
|
||||
/>
|
||||
</div>
|
||||
</StandardModal>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -36,11 +36,6 @@ const messages = defineMessages({
|
||||
defaultMessage: 'Select video',
|
||||
description: 'Video picker modal title.',
|
||||
},
|
||||
blockEditorModalTitle: {
|
||||
id: 'course-authoring.course-unit.modal.block-editor-title.text',
|
||||
defaultMessage: 'Edit component',
|
||||
description: 'Block editor modal title.',
|
||||
},
|
||||
modalContainerTitle: {
|
||||
id: 'course-authoring.course-unit.modal.container.title',
|
||||
defaultMessage: 'Add {componentTitle} component',
|
||||
|
||||
@@ -218,13 +218,7 @@ const XBlockContainerIframe: FC<XBlockContainerIframeProps> = ({
|
||||
/>
|
||||
</div>
|
||||
</StandardModal>
|
||||
<StandardModal
|
||||
title={intl.formatMessage(messages.blockEditorModalTitle)}
|
||||
isOpen={isXBlockEditorModalOpen}
|
||||
onClose={closeXBlockEditorModal}
|
||||
isOverflowVisible={false}
|
||||
size="xl"
|
||||
>
|
||||
{isXBlockEditorModalOpen && (
|
||||
<div className="editor-page">
|
||||
<EditorPage
|
||||
courseId={courseId}
|
||||
@@ -236,7 +230,7 @@ const XBlockContainerIframe: FC<XBlockContainerIframeProps> = ({
|
||||
returnFunction={/* istanbul ignore next */ () => onXBlockSave}
|
||||
/>
|
||||
</div>
|
||||
</StandardModal>
|
||||
)}
|
||||
{Object.keys(accessManagedXBlockData).length ? (
|
||||
<ConfigureModal
|
||||
isXBlockComponent
|
||||
|
||||
@@ -19,11 +19,6 @@ const messages = defineMessages({
|
||||
id: 'course-authoring.course-unit.xblock.video-editor.title',
|
||||
defaultMessage: 'Select video',
|
||||
},
|
||||
blockEditorModalTitle: {
|
||||
id: 'course-authoring.course-unit.xblock.editor.title',
|
||||
defaultMessage: 'Edit component',
|
||||
description: 'Block editor modal title.',
|
||||
},
|
||||
});
|
||||
|
||||
export default messages;
|
||||
|
||||
Reference in New Issue
Block a user