Merge branch 'dev' into refactor/common
This commit is contained in:
commit
a4408b5bc0
145 changed files with 3437 additions and 2822 deletions
|
@ -1,8 +1,8 @@
|
|||
import { Connection, EntityManager, IDatabaseDriver } from '@mikro-orm/core';
|
||||
import { EntityManager } from '@mikro-orm/core';
|
||||
import { Attachment } from '../../../src/entities/content/attachment.entity';
|
||||
import { LearningObject } from '../../../src/entities/content/learning-object.entity';
|
||||
|
||||
export function makeTestAttachments(em: EntityManager<IDatabaseDriver<Connection>>, learningObjects: Array<LearningObject>): Array<Attachment> {
|
||||
export function makeTestAttachments(em: EntityManager, learningObjects: LearningObject[]): Attachment[] {
|
||||
const attachment01 = em.create(Attachment, {
|
||||
learningObject: learningObjects[1],
|
||||
name: 'attachment01',
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
import { Connection, EntityManager, IDatabaseDriver } from '@mikro-orm/core';
|
||||
import { EntityManager } from '@mikro-orm/core';
|
||||
import { Language } from 'dwengo-1-common/src/util/language';
|
||||
import { LearningObject, ReturnValue } from '../../../src/entities/content/learning-object.entity';
|
||||
import { LearningObject } from '../../../src/entities/content/learning-object.entity';
|
||||
import { DwengoContentType } from '../../../src/services/learning-objects/processing/content-type';
|
||||
import { ReturnValue } from '../../../src/entities/content/return-value.entity';
|
||||
|
||||
export function makeTestLearningObjects(em: EntityManager<IDatabaseDriver<Connection>>): Array<LearningObject> {
|
||||
export function makeTestLearningObjects(em: EntityManager): LearningObject[] {
|
||||
const returnValue: ReturnValue = new ReturnValue();
|
||||
returnValue.callbackSchema = '';
|
||||
returnValue.callbackUrl = '';
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { Connection, EntityManager, IDatabaseDriver } from '@mikro-orm/core';
|
||||
import { EntityManager } from '@mikro-orm/core';
|
||||
import { Language } from 'dwengo-1-common/src/util/language';
|
||||
import { LearningPath } from '../../../src/entities/content/learning-path.entity';
|
||||
import { LearningPathTransition } from '../../../src/entities/content/learning-path-transition.entity';
|
||||
import { LearningPathNode } from '../../../src/entities/content/learning-path-node.entity';
|
||||
|
||||
export function makeTestLearningPaths(em: EntityManager<IDatabaseDriver<Connection>>): Array<LearningPath> {
|
||||
export function makeTestLearningPaths(em: EntityManager): LearningPath[] {
|
||||
const learningPathNode01: LearningPathNode = new LearningPathNode();
|
||||
const learningPathNode02: LearningPathNode = new LearningPathNode();
|
||||
const learningPathNode03: LearningPathNode = new LearningPathNode();
|
||||
|
@ -67,7 +67,7 @@ export function makeTestLearningPaths(em: EntityManager<IDatabaseDriver<Connecti
|
|||
learningPathNode05.transitions = [transitions05];
|
||||
learningPathNode05.version = 1;
|
||||
|
||||
const nodes01: Array<LearningPathNode> = [
|
||||
const nodes01: LearningPathNode[] = [
|
||||
// LearningPathNode01,
|
||||
// LearningPathNode02,
|
||||
];
|
||||
|
@ -81,7 +81,7 @@ export function makeTestLearningPaths(em: EntityManager<IDatabaseDriver<Connecti
|
|||
nodes: nodes01,
|
||||
});
|
||||
|
||||
const nodes02: Array<LearningPathNode> = [
|
||||
const nodes02: LearningPathNode[] = [
|
||||
// LearningPathNode03,
|
||||
// LearningPathNode04,
|
||||
// LearningPathNode05,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue