diff --git a/api/lib/routes.js b/api/lib/routes.js index b752e14e9e9..cf909efd3d1 100644 --- a/api/lib/routes.js +++ b/api/lib/routes.js @@ -5,7 +5,6 @@ import * as campaignParticipations from './application/campaign-participations/i import * as certificationCenterInvitations from './application/certification-center-invitations/index.js'; import * as certificationCenterMemberships from './application/certification-center-memberships/index.js'; import * as certificationCenters from './application/certification-centers/index.js'; -import * as certificationCourses from './application/certification-courses/index.js'; import * as certificationPointOfContacts from './application/certification-point-of-contacts/index.js'; import * as certifications from './application/certifications/index.js'; import * as frameworks from './application/frameworks/index.js'; @@ -27,7 +26,6 @@ const routes = [ certificationCenters, certificationCenterInvitations, certificationCenterMemberships, - certificationCourses, certificationPointOfContacts, certifications, healthcheck, diff --git a/api/lib/application/certification-courses/certification-course-controller.js b/api/src/certification/evaluation/application/certification-course-controller.js similarity index 66% rename from api/lib/application/certification-courses/certification-course-controller.js rename to api/src/certification/evaluation/application/certification-course-controller.js index 37e446b64fc..32b3dada21a 100644 --- a/api/lib/application/certification-courses/certification-course-controller.js +++ b/api/src/certification/evaluation/application/certification-course-controller.js @@ -1,8 +1,9 @@ -import { extractLocaleFromRequest } from '../../../src/shared/infrastructure/utils/request-response-utils.js'; -import { usecases } from '../../domain/usecases/index.js'; -import * as certifiedProfileRepository from '../../infrastructure/repositories/certified-profile-repository.js'; -import * as certificationCourseSerializer from '../../infrastructure/serializers/jsonapi/certification-course-serializer.js'; -import * as certifiedProfileSerializer from '../../infrastructure/serializers/jsonapi/certified-profile-serializer.js'; +import { extractLocaleFromRequest } from '../../../shared/infrastructure/utils/request-response-utils.js'; +import { usecases as certificationSharedUsecases } from '../../shared/domain/usecases/index.js'; +import { usecases } from '../domain/usecases/index.js'; +import * as certifiedProfileRepository from '../infrastructure/repositories/certified-profile-repository.js'; +import * as certificationCourseSerializer from '../infrastructure/serializers/certification-course-serializer.js'; +import * as certifiedProfileSerializer from '../infrastructure/serializers/certified-profile-serializer.js'; const save = async function (request, h, dependencies = { extractLocaleFromRequest, certificationCourseSerializer }) { const userId = request.auth.credentials.userId; @@ -24,7 +25,7 @@ const save = async function (request, h, dependencies = { extractLocaleFromReque const get = async function (request, h, dependencies = { certificationCourseSerializer }) { const certificationCourseId = request.params.id; - const certificationCourse = await usecases.getCertificationCourse({ certificationCourseId }); + const certificationCourse = await certificationSharedUsecases.getCertificationCourse({ certificationCourseId }); return dependencies.certificationCourseSerializer.serialize(certificationCourse); }; diff --git a/api/lib/application/certification-courses/index.js b/api/src/certification/evaluation/application/certification-course-route.js similarity index 93% rename from api/lib/application/certification-courses/index.js rename to api/src/certification/evaluation/application/certification-course-route.js index a3f935d6665..2ab40a7e19c 100644 --- a/api/lib/application/certification-courses/index.js +++ b/api/src/certification/evaluation/application/certification-course-route.js @@ -1,7 +1,7 @@ import Joi from 'joi'; -import { securityPreHandlers } from '../../../src/shared/application/security-pre-handlers.js'; -import { identifiersType } from '../../../src/shared/domain/types/identifiers-type.js'; +import { securityPreHandlers } from '../../../shared/application/security-pre-handlers.js'; +import { identifiersType } from '../../../shared/domain/types/identifiers-type.js'; import { certificationCourseController } from './certification-course-controller.js'; const register = async function (server) { diff --git a/api/lib/domain/usecases/retrieve-last-or-create-certification-course.js b/api/src/certification/evaluation/domain/usecases/retrieve-last-or-create-certification-course.js similarity index 93% rename from api/lib/domain/usecases/retrieve-last-or-create-certification-course.js rename to api/src/certification/evaluation/domain/usecases/retrieve-last-or-create-certification-course.js index dbe49cb680a..3787e9d0d70 100644 --- a/api/lib/domain/usecases/retrieve-last-or-create-certification-course.js +++ b/api/src/certification/evaluation/domain/usecases/retrieve-last-or-create-certification-course.js @@ -11,21 +11,21 @@ * @typedef {import('./index.js').AssessmentRepository} AssessmentRepository * @typedef {import('../../../src/shared/domain/models/CertificationCandidate.js').CertificationCandidate} CertificationCandidate */ -import { SessionNotAccessible } from '../../../src/certification/session-management/domain/errors.js'; -import { ComplementaryCertificationCourse } from '../../../src/certification/session-management/domain/models/ComplementaryCertificationCourse.js'; -import { AlgorithmEngineVersion } from '../../../src/certification/shared/domain/models/AlgorithmEngineVersion.js'; -import { CertificationCourse } from '../../../src/certification/shared/domain/models/CertificationCourse.js'; -import { SessionVersion } from '../../../src/certification/shared/domain/models/SessionVersion.js'; -import { config } from '../../../src/shared/config.js'; -import { LanguageNotSupportedError } from '../../../src/shared/domain/errors.js'; +import { DomainTransaction } from '../../../../../lib/infrastructure/DomainTransaction.js'; +import { config } from '../../../../shared/config.js'; +import { LanguageNotSupportedError } from '../../../../shared/domain/errors.js'; import { CandidateNotAuthorizedToJoinSessionError, CandidateNotAuthorizedToResumeCertificationTestError, NotFoundError, UnexpectedUserAccountError, -} from '../../../src/shared/domain/errors.js'; -import { Assessment } from '../../../src/shared/domain/models/Assessment.js'; -import { DomainTransaction } from '../../infrastructure/DomainTransaction.js'; +} from '../../../../shared/domain/errors.js'; +import { Assessment } from '../../../../shared/domain/models/Assessment.js'; +import { SessionNotAccessible } from '../../../session-management/domain/errors.js'; +import { ComplementaryCertificationCourse } from '../../../session-management/domain/models/ComplementaryCertificationCourse.js'; +import { AlgorithmEngineVersion } from '../../../shared/domain/models/AlgorithmEngineVersion.js'; +import { CertificationCourse } from '../../../shared/domain/models/CertificationCourse.js'; +import { SessionVersion } from '../../../shared/domain/models/SessionVersion.js'; const { features } = config; diff --git a/api/lib/infrastructure/repositories/certified-profile-repository.js b/api/src/certification/evaluation/infrastructure/repositories/certified-profile-repository.js similarity index 90% rename from api/lib/infrastructure/repositories/certified-profile-repository.js rename to api/src/certification/evaluation/infrastructure/repositories/certified-profile-repository.js index a00685db3d1..88eff95a5a1 100644 --- a/api/lib/infrastructure/repositories/certified-profile-repository.js +++ b/api/src/certification/evaluation/infrastructure/repositories/certified-profile-repository.js @@ -1,21 +1,21 @@ import _ from 'lodash'; -import { knex } from '../../../db/knex-database-connection.js'; -import { NotFoundError } from '../../../src/shared/domain/errors.js'; +import { knex } from '../../../../../db/knex-database-connection.js'; +import * as knowledgeElementRepository from '../../../../../lib/infrastructure/repositories/knowledge-element-repository.js'; +import { NotFoundError } from '../../../../../src/shared/domain/errors.js'; import { CertifiedArea, CertifiedCompetence, CertifiedProfile, CertifiedSkill, CertifiedTube, -} from '../../../src/shared/domain/read-models/CertifiedProfile.js'; +} from '../../../../../src/shared/domain/read-models/CertifiedProfile.js'; import { areaDatasource, competenceDatasource, skillDatasource, tubeDatasource, -} from '../../../src/shared/infrastructure/datasources/learning-content/index.js'; -import * as knowledgeElementRepository from './knowledge-element-repository.js'; +} from '../../../../../src/shared/infrastructure/datasources/learning-content/index.js'; const get = async function (certificationCourseId) { const certificationDatas = await knex diff --git a/api/lib/infrastructure/serializers/jsonapi/certification-course-serializer.js b/api/src/certification/evaluation/infrastructure/serializers/certification-course-serializer.js similarity index 100% rename from api/lib/infrastructure/serializers/jsonapi/certification-course-serializer.js rename to api/src/certification/evaluation/infrastructure/serializers/certification-course-serializer.js diff --git a/api/lib/infrastructure/serializers/jsonapi/certified-profile-serializer.js b/api/src/certification/evaluation/infrastructure/serializers/certified-profile-serializer.js similarity index 100% rename from api/lib/infrastructure/serializers/jsonapi/certified-profile-serializer.js rename to api/src/certification/evaluation/infrastructure/serializers/certified-profile-serializer.js diff --git a/api/src/certification/session-management/application/certification-course-controller.js b/api/src/certification/session-management/application/certification-course-controller.js index 67db5b4fe48..b1d1383cb7e 100644 --- a/api/src/certification/session-management/application/certification-course-controller.js +++ b/api/src/certification/session-management/application/certification-course-controller.js @@ -1,5 +1,5 @@ import * as events from '../../../../lib/domain/events/index.js'; -import { usecases as libUsecases } from '../../../../lib/domain/usecases/index.js'; +import { usecases as certificationSharedUsecases } from '../../../../src/certification/shared/domain/usecases/index.js'; import { usecases } from '../domain/usecases/index.js'; import * as certificationSerializer from '../infrastructure/serializers/certification-serializer.js'; import * as juryCommentSerializer from '../infrastructure/serializers/jury-comment-serializer.js'; @@ -67,7 +67,7 @@ const update = async function (request, h, dependencies = { certificationSeriali userId, ); await usecases.correctCandidateIdentityInCertificationCourse({ command }); - const updatedCertificationCourse = await libUsecases.getCertificationCourse({ + const updatedCertificationCourse = await certificationSharedUsecases.getCertificationCourse({ certificationCourseId: command.certificationCourseId, }); return dependencies.certificationSerializer.serializeFromCertificationCourse(updatedCertificationCourse); diff --git a/api/lib/domain/usecases/get-certification-course.js b/api/src/certification/shared/domain/usecases/get-certification-course.js similarity index 100% rename from api/lib/domain/usecases/get-certification-course.js rename to api/src/certification/shared/domain/usecases/get-certification-course.js diff --git a/api/src/certification/shared/domain/usecases/index.js b/api/src/certification/shared/domain/usecases/index.js new file mode 100644 index 00000000000..0136132af52 --- /dev/null +++ b/api/src/certification/shared/domain/usecases/index.js @@ -0,0 +1,29 @@ +import { dirname, join } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +import { injectDependencies } from '../../../../shared/infrastructure/utils/dependency-injection.js'; +import { importNamedExportsFromDirectory } from '../../../../shared/infrastructure/utils/import-named-exports-from-directory.js'; + +/** + * @typedef {certificationCompanionAlertRepository} CertificationCompanionAlertRepository + */ + +const dependencies = {}; + +const path = dirname(fileURLToPath(import.meta.url)); + +/** + * Note : current ignoredFileNames are injected in * {@link file://./../../../shared/domain/usecases/index.js} + * This is in progress, because they should be injected in this file and not by shared sub-domain + * The only remaining file ignored should be index.js + */ +const usecasesWithoutInjectedDependencies = { + ...(await importNamedExportsFromDirectory({ + path: join(path, './'), + ignoredFileNames: ['index.js'], + })), +}; + +const usecases = injectDependencies(usecasesWithoutInjectedDependencies, dependencies); + +export { usecases }; diff --git a/api/tests/acceptance/application/certification-courses/certification-course-controller_test.js b/api/tests/certification/evaluation/acceptance/application/certification-courses/certification-course-controller_test.js similarity index 97% rename from api/tests/acceptance/application/certification-courses/certification-course-controller_test.js rename to api/tests/certification/evaluation/acceptance/application/certification-courses/certification-course-controller_test.js index cbd453c2599..f4abf8f829a 100644 --- a/api/tests/acceptance/application/certification-courses/certification-course-controller_test.js +++ b/api/tests/certification/evaluation/acceptance/application/certification-courses/certification-course-controller_test.js @@ -1,10 +1,10 @@ -import { CertificationIssueReportCategory } from '../../../../src/certification/shared/domain/models/CertificationIssueReportCategory.js'; +import { CertificationIssueReportCategory } from '../../../../../../src/certification/shared/domain/models/CertificationIssueReportCategory.js'; import { SESSIONS_VERSIONS, SessionVersion, -} from '../../../../src/certification/shared/domain/models/SessionVersion.js'; -import { config } from '../../../../src/shared/config.js'; -import { KnowledgeElement } from '../../../../src/shared/domain/models/KnowledgeElement.js'; +} from '../../../../../../src/certification/shared/domain/models/SessionVersion.js'; +import { config } from '../../../../../../src/shared/config.js'; +import { KnowledgeElement } from '../../../../../../src/shared/domain/models/KnowledgeElement.js'; import { createServer, databaseBuilder, @@ -13,7 +13,7 @@ import { knex, learningContentBuilder, mockLearningContent, -} from '../../../test-helper.js'; +} from '../../../../../test-helper.js'; describe('Acceptance | API | Certification Course', function () { let server; diff --git a/api/tests/acceptance/application/certification-courses/index_test.js b/api/tests/certification/evaluation/acceptance/application/certification-courses/index_test.js similarity index 99% rename from api/tests/acceptance/application/certification-courses/index_test.js rename to api/tests/certification/evaluation/acceptance/application/certification-courses/index_test.js index d5bd18c0f41..3c840cf5622 100644 --- a/api/tests/acceptance/application/certification-courses/index_test.js +++ b/api/tests/certification/evaluation/acceptance/application/certification-courses/index_test.js @@ -6,7 +6,7 @@ import { knex, learningContentBuilder, mockLearningContent, -} from '../../../test-helper.js'; +} from '../../../../../test-helper.js'; describe('Acceptance | Route | Certification Courses', function () { let server; diff --git a/api/tests/integration/infrastructure/repositories/certified-profile-repository_test.js b/api/tests/certification/evaluation/integration/infrastructure/repositories/certified-profile-repository_test.js similarity index 95% rename from api/tests/integration/infrastructure/repositories/certified-profile-repository_test.js rename to api/tests/certification/evaluation/integration/infrastructure/repositories/certified-profile-repository_test.js index 7ceeec51089..5dd9e985335 100644 --- a/api/tests/integration/infrastructure/repositories/certified-profile-repository_test.js +++ b/api/tests/certification/evaluation/integration/infrastructure/repositories/certified-profile-repository_test.js @@ -1,8 +1,8 @@ -import * as certifiedProfileRepository from '../../../../lib/infrastructure/repositories/certified-profile-repository.js'; -import { NotFoundError } from '../../../../src/shared/domain/errors.js'; -import { KnowledgeElement } from '../../../../src/shared/domain/models/KnowledgeElement.js'; -import { CertifiedProfile } from '../../../../src/shared/domain/read-models/CertifiedProfile.js'; -import { catchErr, databaseBuilder, domainBuilder, expect, mockLearningContent } from '../../../test-helper.js'; +import * as certifiedProfileRepository from '../../../../../../src/certification/evaluation/infrastructure/repositories/certified-profile-repository.js'; +import { NotFoundError } from '../../../../../../src/shared/domain/errors.js'; +import { KnowledgeElement } from '../../../../../../src/shared/domain/models/KnowledgeElement.js'; +import { CertifiedProfile } from '../../../../../../src/shared/domain/read-models/CertifiedProfile.js'; +import { catchErr, databaseBuilder, domainBuilder, expect, mockLearningContent } from '../../../../../test-helper.js'; describe('Integration | Repository | Certified Profile', function () { describe('#get', function () { diff --git a/api/tests/unit/infrastructure/serializers/jsonapi/certification-course-serializer_test.js b/api/tests/certification/evaluation/integration/serializers/certification-course-serializer_test.js similarity index 97% rename from api/tests/unit/infrastructure/serializers/jsonapi/certification-course-serializer_test.js rename to api/tests/certification/evaluation/integration/serializers/certification-course-serializer_test.js index 2c5eb3964f5..a814e3a8695 100644 --- a/api/tests/unit/infrastructure/serializers/jsonapi/certification-course-serializer_test.js +++ b/api/tests/certification/evaluation/integration/serializers/certification-course-serializer_test.js @@ -1,4 +1,4 @@ -import * as serializer from '../../../../../lib/infrastructure/serializers/jsonapi/certification-course-serializer.js'; +import * as serializer from '../../../../../src/certification/evaluation/infrastructure/serializers/certification-course-serializer.js'; import { CertificationCourse } from '../../../../../src/certification/shared/domain/models/CertificationCourse.js'; import { CertificationIssueReport } from '../../../../../src/certification/shared/domain/models/CertificationIssueReport.js'; import { CertificationIssueReportCategory } from '../../../../../src/certification/shared/domain/models/CertificationIssueReportCategory.js'; diff --git a/api/tests/unit/infrastructure/serializers/jsonapi/certified-profile-serializer_test.js b/api/tests/certification/evaluation/integration/serializers/certified-profile-serializer_test.js similarity index 96% rename from api/tests/unit/infrastructure/serializers/jsonapi/certified-profile-serializer_test.js rename to api/tests/certification/evaluation/integration/serializers/certified-profile-serializer_test.js index d46264f03b7..4c397d826a7 100644 --- a/api/tests/unit/infrastructure/serializers/jsonapi/certified-profile-serializer_test.js +++ b/api/tests/certification/evaluation/integration/serializers/certified-profile-serializer_test.js @@ -1,4 +1,4 @@ -import * as serializer from '../../../../../lib/infrastructure/serializers/jsonapi/certified-profile-serializer.js'; +import * as serializer from '../../../../../src/certification/evaluation/infrastructure/serializers/certified-profile-serializer.js'; import { domainBuilder, expect } from '../../../../test-helper.js'; describe('Unit | Serializer | JSONAPI | certified-profile-serializer', function () { diff --git a/api/tests/unit/application/certification-courses/index_test.js b/api/tests/certification/evaluation/unit/application/certification-courses-route_test.js similarity index 83% rename from api/tests/unit/application/certification-courses/index_test.js rename to api/tests/certification/evaluation/unit/application/certification-courses-route_test.js index 74244d1c26f..3c9b824518f 100644 --- a/api/tests/unit/application/certification-courses/index_test.js +++ b/api/tests/certification/evaluation/unit/application/certification-courses-route_test.js @@ -1,7 +1,7 @@ -import { certificationCourseController as certificationCoursesController } from '../../../../lib/application/certification-courses/certification-course-controller.js'; -import * as moduleUnderTest from '../../../../lib/application/certification-courses/index.js'; -import { securityPreHandlers } from '../../../../src/shared/application/security-pre-handlers.js'; -import { expect, HttpTestServer, sinon } from '../../../test-helper.js'; +import { certificationCourseController as certificationCoursesController } from '../../../../../src/certification/evaluation/application/certification-course-controller.js'; +import * as moduleUnderTest from '../../../../../src/certification/evaluation/application/certification-course-route.js'; +import { securityPreHandlers } from '../../../../../src/shared/application/security-pre-handlers.js'; +import { expect, HttpTestServer, sinon } from '../../../../test-helper.js'; describe('Unit | Application | Certifications Course | Route', function () { describe('GET /api/admin/certifications/{id}/certified-profile', function () { diff --git a/api/tests/unit/domain/usecases/get-certification-course_test.js b/api/tests/certification/evaluation/unit/domain/usecases/get-certification-course_test.js similarity index 72% rename from api/tests/unit/domain/usecases/get-certification-course_test.js rename to api/tests/certification/evaluation/unit/domain/usecases/get-certification-course_test.js index 622355df765..e4994cd9275 100644 --- a/api/tests/unit/domain/usecases/get-certification-course_test.js +++ b/api/tests/certification/evaluation/unit/domain/usecases/get-certification-course_test.js @@ -1,6 +1,6 @@ -import { getCertificationCourse } from '../../../../lib/domain/usecases/get-certification-course.js'; -import { CertificationCourse } from '../../../../src/certification/shared/domain/models/CertificationCourse.js'; -import { expect, sinon } from '../../../test-helper.js'; +import { CertificationCourse } from '../../../../../../src/certification/shared/domain/models/CertificationCourse.js'; +import { getCertificationCourse } from '../../../../../../src/certification/shared/domain/usecases/get-certification-course.js'; +import { expect, sinon } from '../../../../../test-helper.js'; describe('Unit | UseCase | get-certification-course', function () { let certificationCourse; diff --git a/api/tests/certification/session-management/unit/application/certification-course-controller_test.js b/api/tests/certification/session-management/unit/application/certification-course-controller_test.js index 8745ea83a9a..8adc8fda1f9 100644 --- a/api/tests/certification/session-management/unit/application/certification-course-controller_test.js +++ b/api/tests/certification/session-management/unit/application/certification-course-controller_test.js @@ -1,8 +1,8 @@ import { CertificationCourseRejected } from '../../../../../lib/domain/events/CertificationCourseRejected.js'; import { CertificationCourseUnrejected } from '../../../../../lib/domain/events/CertificationCourseUnrejected.js'; -import { usecases as libUsecases } from '../../../../../lib/domain/usecases/index.js'; import { certificationCourseController } from '../../../../../src/certification/session-management/application/certification-course-controller.js'; import { usecases } from '../../../../../src/certification/session-management/domain/usecases/index.js'; +import { usecases as certificationSharedUsecases } from '../../../../../src/certification/shared/domain/usecases/index.js'; import { domainBuilder, expect, hFake, sinon } from '../../../../test-helper.js'; describe('Certification | Session Management | Unit | Application | Controller | Certification Course', function () { @@ -141,7 +141,7 @@ describe('Certification | Session Management | Unit | Application | Controller | // given sinon.stub(usecases, 'correctCandidateIdentityInCertificationCourse').resolves(); const updatedCertificationCourse = domainBuilder.buildCertificationCourse(); - sinon.stub(libUsecases, 'getCertificationCourse').resolves(updatedCertificationCourse); + sinon.stub(certificationSharedUsecases, 'getCertificationCourse').resolves(updatedCertificationCourse); certificationSerializer.deserializeCertificationCandidateModificationCommand.resolves({ firstName: 'Phil', lastName: 'Defer', @@ -181,7 +181,7 @@ describe('Certification | Session Management | Unit | Application | Controller | // given sinon.stub(usecases, 'correctCandidateIdentityInCertificationCourse').resolves(); const updatedCertificationCourse = domainBuilder.buildCertificationCourse(); - sinon.stub(libUsecases, 'getCertificationCourse').resolves(updatedCertificationCourse); + sinon.stub(certificationSharedUsecases, 'getCertificationCourse').resolves(updatedCertificationCourse); certificationSerializer.deserializeCertificationCandidateModificationCommand.resolves({ firstName: 'Phil', lastName: 'Defer', diff --git a/api/tests/unit/application/certification-courses/certification-course-controller_test.js b/api/tests/unit/application/certification-courses/certification-course-controller_test.js index a19e7050723..e6de91a1fd1 100644 --- a/api/tests/unit/application/certification-courses/certification-course-controller_test.js +++ b/api/tests/unit/application/certification-courses/certification-course-controller_test.js @@ -1,6 +1,7 @@ -import { certificationCourseController } from '../../../../lib/application/certification-courses/certification-course-controller.js'; -import { usecases } from '../../../../lib/domain/usecases/index.js'; +import { certificationCourseController } from '../../../../src/certification/evaluation/application/certification-course-controller.js'; +import { usecases } from '../../../../src/certification/evaluation/domain/usecases/index.js'; import { CertificationCourse } from '../../../../src/certification/shared/domain/models/CertificationCourse.js'; +import { usecases as certificationSharedUsecases } from '../../../../src/certification/shared/domain/usecases/index.js'; import { domainBuilder, expect, generateValidRequestAuthorizationHeader, hFake, sinon } from '../../../test-helper.js'; describe('Unit | Controller | certification-course-controller', function () { @@ -92,7 +93,10 @@ describe('Unit | Controller | certification-course-controller', function () { const certificationCourseId = 'certification_course_id'; const certificationCourse = new CertificationCourse({ id: certificationCourseId, sessionId }); const userId = 42; - sinon.stub(usecases, 'getCertificationCourse').withArgs({ certificationCourseId }).resolves(certificationCourse); + sinon + .stub(certificationSharedUsecases, 'getCertificationCourse') + .withArgs({ certificationCourseId }) + .resolves(certificationCourse); certificationCourseSerializer.serialize.withArgs(certificationCourse).resolves(certificationCourse); const request = { params: { id: certificationCourseId }, diff --git a/api/tests/unit/domain/usecases/retrieve-last-or-create-certification-course_test.js b/api/tests/unit/domain/usecases/retrieve-last-or-create-certification-course_test.js index 06737f44dd4..9347faa4fba 100644 --- a/api/tests/unit/domain/usecases/retrieve-last-or-create-certification-course_test.js +++ b/api/tests/unit/domain/usecases/retrieve-last-or-create-certification-course_test.js @@ -1,6 +1,6 @@ import _ from 'lodash'; -import { retrieveLastOrCreateCertificationCourse } from '../../../../lib/domain/usecases/retrieve-last-or-create-certification-course.js'; +import { retrieveLastOrCreateCertificationCourse } from '../../../../src/certification/evaluation/domain/usecases/retrieve-last-or-create-certification-course.js'; import { SessionNotAccessible } from '../../../../src/certification/session-management/domain/errors.js'; import { ComplementaryCertificationCourse } from '../../../../src/certification/session-management/domain/models/ComplementaryCertificationCourse.js'; import { AlgorithmEngineVersion } from '../../../../src/certification/shared/domain/models/AlgorithmEngineVersion.js';