Skip to content

Commit dc557cb

Browse files
committed
fix: create a new Vertical from a Library Unit
1 parent 9a8d55d commit dc557cb

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

src/course-outline/CourseOutline.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ describe('<CourseOutline />', () => {
447447
const [subsection] = section.childInfo.children;
448448
expect(axiosMock.history.post[0].data).toBe(JSON.stringify({
449449
type: COMPONENT_TYPES.libraryV2,
450-
category: 'unit',
450+
category: 'vertical',
451451
parent_locator: subsection.id,
452452
library_content_key: containerKey,
453453
}));

src/course-outline/subsection-card/SubsectionCard.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ const SubsectionCard = ({
186186
const handleSelectLibraryUnit = useCallback((selectedUnit) => {
187187
onAddUnitFromLibrary({
188188
type: COMPONENT_TYPES.libraryV2,
189-
category: ContainerType.Unit,
189+
category: ContainerType.Vertical,
190190
parentLocator: id,
191191
libraryContentKey: selectedUnit.usageKey,
192192
});

src/course-outline/subsection-card/SubsectionCard.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ describe('<SubsectionCard />', () => {
298298
expect(handleOnAddUnitFromLibrary).toHaveBeenCalledWith({
299299
type: COMPONENT_TYPES.libraryV2,
300300
parentLocator: '123',
301-
category: 'unit',
301+
category: 'vertical',
302302
libraryContentKey: containerKey,
303303
});
304304
});

src/generic/key-utils.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export const buildCollectionUsageKey = (learningContextKey: string, collectionId
5252

5353
export enum ContainerType {
5454
Unit = 'unit',
55+
Vertical = 'vertical',
5556
}
5657

5758
/**

0 commit comments

Comments
 (0)