Skip to content

Commit

Permalink
fixed broken Test
Browse files Browse the repository at this point in the history
  • Loading branch information
mountler committed Dec 15, 2023
1 parent 85f39bf commit 81a1a66
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,14 @@ export default class BackendAdapterUtils {
storyElement: APIStoryElement | null
): BackendStoryTO | null {
if (storyElement === null) return null;
else
return {
storyTexts: storyElement.storyTexts,
elementModel: this.extractModelData(
storyElement.elementModel
) as LearningElementModel,
} as BackendStoryTO;
else {
let backendStoryTO = new BackendStoryTO();
backendStoryTO.storyTexts = storyElement.storyTexts;
backendStoryTO.elementModel = this.extractModelData(
storyElement.elementModel
) as LearningElementModel;
return backendStoryTO;
}
}

// creates BackendElementTOs from the AWT if the element type is supported
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export const expectedSpaceTO: BackendSpaceTO = {
requiredScore: expect.any(Number),
template: expect.any(String),
templateStyle: expect.any(String),
introStory: expect.toBeOneOf([BackendStoryTO, null]),
outroStory: expect.toBeOneOf([BackendStoryTO, null]),
introStory: expect.toBeOneOf([expect.any(BackendStoryTO), null]),
outroStory: expect.toBeOneOf([expect.any(BackendStoryTO), null]),
};

export const expectedBaseElementTO =
Expand Down

0 comments on commit 81a1a66

Please sign in to comment.