Skip to content

Commit

Permalink
N21-1256 fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arnegns committed Sep 18, 2023
1 parent e419bb9 commit 57fe0a6
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import { LegacyLogger } from '@src/core/logger';
import { CopyElementType, CopyHelperService, CopyStatus } from '@src/modules/copy-helper';
import { getResolvedValues } from '@src/modules/files-storage/helper';
import { LessonCopyService } from '@src/modules/lesson/service';
import { TaskCopyService } from '@src/modules/task';
import { TaskCopyService } from '@src/modules/task/service';
import { sortBy } from 'lodash';

type BoardCopyParams = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { CourseRepo } from '@shared/repo';
import { Course, EntityId } from '@shared/domain';

@Injectable()
// Hint: If you inject this service, sometimes you have to use the full path as import for some reason
export class CourseService {
constructor(private readonly repo: CourseRepo) {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { BoardExternalReference, BoardExternalReferenceType, EntityId } from '@s
import { BoardRepo, LessonRepo } from '@shared/repo';
import { boardFactory, courseFactory, lessonFactory, setupEntities, taskFactory, userFactory } from '@shared/testing';
import { CardService, ColumnBoardService, ColumnService, ContentElementService } from '@src/modules/board';
import { TaskService } from '@src/modules/task';
import { TaskService } from '@src/modules/task/service';
import { ColumnBoardTargetService } from './column-board-target.service';
import { RoomsService } from './rooms.service';

Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/modules/learnroom/service/rooms.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Injectable } from '@nestjs/common';
import { Board, BoardExternalReferenceType, ColumnBoardTarget, EntityId } from '@shared/domain';
import { BoardRepo, LessonRepo } from '@shared/repo';
import { ColumnBoardService } from '@src/modules/board';
import { TaskService } from '@src/modules/task';
import { TaskService } from '@src/modules/task/service';
import { ColumnBoardTargetService } from './column-board-target.service';

@Injectable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {
} from '@shared/testing';
import { CopyElementType, CopyHelperService, CopyStatus, CopyStatusEnum } from '@src/modules/copy-helper';
import { CopyFilesService } from '@src/modules/files-storage-client';
import { TaskCopyService } from '@src/modules/task';
import { TaskCopyService } from '@src/modules/task/service';
import { EtherpadService } from './etherpad.service';
import { LessonCopyService } from './lesson-copy.service';
import { NexboardService } from './nexboard.service';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Test, TestingModule } from '@nestjs/testing';
import { courseFactory, lessonFactory, setupEntities, shareTokenFactory, taskFactory } from '@shared/testing';
import { CourseService } from '@src/modules/learnroom/service/course.service';
import { LessonService } from '@src/modules/lesson/service';
import { TaskService } from '@src/modules/task';
import { TaskService } from '@src/modules/task/service';
import { ObjectId } from 'bson';
import { ShareTokenContextType, ShareTokenParentType } from '../domainobject/share-token.do';
import { ShareTokenRepo } from '../repo/share-token.repo';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Injectable } from '@nestjs/common';
import { CourseService } from '@src/modules/learnroom/service/course.service';
import { LessonService } from '@src/modules/lesson/service';
import { TaskService } from '@src/modules/task';
import { TaskService } from '@src/modules/task/service';
import {
ShareTokenContext,
ShareTokenDO,
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/modules/sharing/uc/share-token.uc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { CopyElementType, CopyStatus, CopyStatusEnum } from '@src/modules/copy-h
import { CourseCopyService } from '@src/modules/learnroom';
import { CourseService } from '@src/modules/learnroom/service/course.service';
import { LessonCopyService } from '@src/modules/lesson/service';
import { TaskCopyService } from '@src/modules/task';
import { TaskCopyService } from '@src/modules/task/service';
import { ShareTokenContextType, ShareTokenParentType, ShareTokenPayload } from '../domainobject/share-token.do';
import { ShareTokenService } from '../service';
import { ShareTokenUC } from './share-token.uc';
Expand Down
2 changes: 1 addition & 1 deletion apps/server/src/modules/sharing/uc/share-token.uc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { CopyStatus } from '@src/modules/copy-helper';
import { CourseCopyService } from '@src/modules/learnroom';
import { CourseService } from '@src/modules/learnroom/service/course.service';
import { LessonCopyService } from '@src/modules/lesson/service';
import { TaskCopyService } from '@src/modules/task';
import { TaskCopyService } from '@src/modules/task/service';
import {
ShareTokenContext,
ShareTokenContextType,
Expand Down
1 change: 0 additions & 1 deletion apps/server/src/modules/task/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export * from './task.module';
export { TaskCopyService, TaskService } from './service';
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
schoolExternalToolFactory,
setupEntities,
} from '@shared/testing';
import { CourseService } from '@src/modules/learnroom/service/course.service';
import { CourseService } from '@src/modules/learnroom/service';
import { SchoolService } from '@src/modules/school';
import { CustomParameterEntry } from '../../../common/domain';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { createMock } from '@golevelup/ts-jest';
import { Test, TestingModule } from '@nestjs/testing';
import { CourseRepo } from '@shared/repo';
import { contextExternalToolFactory, externalToolFactory, schoolExternalToolFactory } from '@shared/testing';
import { SchoolService } from '@src/modules/school';
import { CourseService } from '@src/modules/learnroom/service';
import { ContextExternalTool } from '../../../context-external-tool/domain';
import { ExternalTool } from '../../../external-tool/domain';
import { SchoolExternalTool } from '../../../school-external-tool/domain';
import { LaunchRequestMethod, PropertyData, PropertyLocation } from '../../types';
import { BasicToolLaunchStrategy } from './basic-tool-launch.strategy';
import { IToolLaunchParams } from './tool-launch-params.interface';
import { ExternalTool } from '../../../external-tool/domain';
import { SchoolExternalTool } from '../../../school-external-tool/domain';
import { ContextExternalTool } from '../../../context-external-tool/domain';

describe('BasicToolLaunchStrategy', () => {
let module: TestingModule;
Expand All @@ -23,8 +23,8 @@ describe('BasicToolLaunchStrategy', () => {
useValue: createMock<SchoolService>(),
},
{
provide: CourseRepo,
useValue: createMock<CourseRepo>(),
provide: CourseService,
useValue: createMock<CourseService>(),
},
],
}).compile();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { PseudonymService } from '@src/modules/pseudonym';
import { SchoolService } from '@src/modules/school';
import { UserService } from '@src/modules/user';
import { Authorization } from 'oauth-1.0a';
import { CourseService } from '@src/modules/learnroom/service/course.service';
import { CourseService } from '@src/modules/learnroom/service';
import { LtiRole } from '../../../common/enum';
import { ExternalTool } from '../../../external-tool/domain';
import { LtiRoleMapper } from '../../mapper';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createMock } from '@golevelup/ts-jest';
import { Test, TestingModule } from '@nestjs/testing';
import { contextExternalToolFactory, externalToolFactory, schoolExternalToolFactory } from '@shared/testing';
import { SchoolService } from '@src/modules/school';
import { CourseService } from '@src/modules/learnroom/service/course.service';
import { CourseService } from '@src/modules/learnroom/service';
import { ContextExternalTool } from '../../../context-external-tool/domain';
import { ExternalTool } from '../../../external-tool/domain';
import { SchoolExternalTool } from '../../../school-external-tool/domain';
Expand Down

0 comments on commit 57fe0a6

Please sign in to comment.