diff --git a/api/lib/domain/usecases/index.js b/api/lib/domain/usecases/index.js index a0aaf4f9d94..47200b95e37 100644 --- a/api/lib/domain/usecases/index.js +++ b/api/lib/domain/usecases/index.js @@ -126,7 +126,6 @@ import { userOrgaSettingsRepository } from '../../../src/team/infrastructure/rep import * as certificationChallengesService from '../../domain/services/certification-challenges-service.js'; import * as obfuscationService from '../../domain/services/obfuscation-service.js'; import * as passwordGenerator from '../../domain/services/password-generator.js'; -import * as verifyCertificateCodeService from '../../domain/services/verify-certificate-code-service.js'; import * as badgeAcquisitionRepository from '../../infrastructure/repositories/badge-acquisition-repository.js'; import * as badgeForCalculationRepository from '../../infrastructure/repositories/badge-for-calculation-repository.js'; import * as campaignRepository from '../../infrastructure/repositories/campaign-repository.js'; @@ -185,7 +184,6 @@ function requirePoleEmploiNotifier() { * @typedef {certificationCourseRepository} CertificationCourseRepository * @typedef {userRepository} UserRepository * @typedef {certificationChallengesService} CertificationChallengesService - * @typedef {verifyCertificateCodeService} VerifyCertificateCodeService * @typedef {assessmentRepository} AssessmentRepository */ const dependencies = { @@ -332,7 +330,6 @@ const dependencies = { userService, userToCreateRepository, userValidator, - verifyCertificateCodeService, writeCsvUtils, badgeCriteriaRepository, sharedSessionRepository, diff --git a/api/lib/domain/services/verify-certificate-code-service.js b/api/src/certification/evaluation/domain/services/verify-certificate-code-service.js similarity index 80% rename from api/lib/domain/services/verify-certificate-code-service.js rename to api/src/certification/evaluation/domain/services/verify-certificate-code-service.js index d482adda772..2dbaa4db709 100644 --- a/api/lib/domain/services/verify-certificate-code-service.js +++ b/api/src/certification/evaluation/domain/services/verify-certificate-code-service.js @@ -1,8 +1,8 @@ import _ from 'lodash'; -import * as certificationCourseRepository from '../../../src/certification/shared/infrastructure/repositories/certification-course-repository.js'; -import { config } from '../../../src/shared/config.js'; -import { CertificateVerificationCodeGenerationTooManyTrials } from '../../../src/shared/domain/errors.js'; +import { config } from '../../../../shared/config.js'; +import { CertificateVerificationCodeGenerationTooManyTrials } from '../../../../shared/domain/errors.js'; +import * as certificationCourseRepository from '../../../shared/infrastructure/repositories/certification-course-repository.js'; const availableCharacters = `${config.availableCharacterForCode.numbers}${config.availableCharacterForCode.letters}`.split(''); diff --git a/api/src/certification/evaluation/domain/usecases/index.js b/api/src/certification/evaluation/domain/usecases/index.js index fb02174b43b..78ed690d5be 100644 --- a/api/src/certification/evaluation/domain/usecases/index.js +++ b/api/src/certification/evaluation/domain/usecases/index.js @@ -2,12 +2,12 @@ import { dirname, join } from 'node:path'; import { fileURLToPath } from 'node:url'; import * as certificationChallengesService from '../../../../../lib/domain/services/certification-challenges-service.js'; -import * as verifyCertificateCodeService from '../../../../../lib/domain/services/verify-certificate-code-service.js'; import { pickChallengeService } from '../../../../evaluation/domain/services/pick-challenge-service.js'; import * as languageService from '../../../../shared/domain/services/language-service.js'; import * as placementProfileService from '../../../../shared/domain/services/placement-profile-service.js'; import { injectDependencies } from '../../../../shared/infrastructure/utils/dependency-injection.js'; import { importNamedExportsFromDirectory } from '../../../../shared/infrastructure/utils/import-named-exports-from-directory.js'; +import * as verifyCertificateCodeService from '../../../evaluation/domain/services/verify-certificate-code-service.js'; import * as flashAlgorithmService from '../../../flash-certification/domain/services/algorithm-methods/flash.js'; import { answerRepository, diff --git a/api/tests/certification/results/acceptance/application/certification-attestation-route_test.js b/api/tests/certification/evaluation/acceptance/application/certification-attestation-route_test.js similarity index 99% rename from api/tests/certification/results/acceptance/application/certification-attestation-route_test.js rename to api/tests/certification/evaluation/acceptance/application/certification-attestation-route_test.js index 0d78e0d7b54..cd86dcbb6af 100644 --- a/api/tests/certification/results/acceptance/application/certification-attestation-route_test.js +++ b/api/tests/certification/evaluation/acceptance/application/certification-attestation-route_test.js @@ -1,7 +1,7 @@ import { readFile } from 'node:fs/promises'; import * as url from 'node:url'; -import { generateCertificateVerificationCode } from '../../../../../lib/domain/services/verify-certificate-code-service.js'; +import { generateCertificateVerificationCode } from '../../../../../src/certification/evaluation/domain/services/verify-certificate-code-service.js'; import { Assessment } from '../../../../../src/shared/domain/models/index.js'; import { AssessmentResult, Membership } from '../../../../../src/shared/domain/models/index.js'; import { diff --git a/api/tests/certification/results/acceptance/application/certification-route_test.js b/api/tests/certification/evaluation/acceptance/application/certification-route_test.js similarity index 99% rename from api/tests/certification/results/acceptance/application/certification-route_test.js rename to api/tests/certification/evaluation/acceptance/application/certification-route_test.js index 4dd5c02bb8f..120133147f8 100644 --- a/api/tests/certification/results/acceptance/application/certification-route_test.js +++ b/api/tests/certification/evaluation/acceptance/application/certification-route_test.js @@ -1,4 +1,4 @@ -import { generateCertificateVerificationCode } from '../../../../../lib/domain/services/verify-certificate-code-service.js'; +import { generateCertificateVerificationCode } from '../../../../../src/certification/evaluation/domain/services/verify-certificate-code-service.js'; import { AutoJuryCommentKeys } from '../../../../../src/certification/shared/domain/models/JuryComment.js'; import { SESSIONS_VERSIONS } from '../../../../../src/certification/shared/domain/models/SessionVersion.js'; import { Assessment } from '../../../../../src/shared/domain/models/index.js'; diff --git a/api/tests/acceptance/application/certifications/sticker.pdf b/api/tests/certification/evaluation/acceptance/application/sticker.pdf similarity index 100% rename from api/tests/acceptance/application/certifications/sticker.pdf rename to api/tests/certification/evaluation/acceptance/application/sticker.pdf diff --git a/api/tests/unit/domain/services/verify-certificate-code-service_test.js b/api/tests/certification/evaluation/unit/domain/services/verify-certificate-code-service_test.js similarity index 90% rename from api/tests/unit/domain/services/verify-certificate-code-service_test.js rename to api/tests/certification/evaluation/unit/domain/services/verify-certificate-code-service_test.js index 729fa67cc8d..bb6641f815f 100644 --- a/api/tests/unit/domain/services/verify-certificate-code-service_test.js +++ b/api/tests/certification/evaluation/unit/domain/services/verify-certificate-code-service_test.js @@ -1,8 +1,8 @@ import _ from 'lodash'; -import * as verifyCertificateCodeService from '../../../../lib/domain/services/verify-certificate-code-service.js'; -import { CertificateVerificationCodeGenerationTooManyTrials } from '../../../../src/shared/domain/errors.js'; -import { catchErr, expect, sinon } from '../../../test-helper.js'; +import * as verifyCertificateCodeService from '../../../../../../src/certification/evaluation/domain/services/verify-certificate-code-service.js'; +import { CertificateVerificationCodeGenerationTooManyTrials } from '../../../../../../src/shared/domain/errors.js'; +import { catchErr, expect, sinon } from '../../../../../test-helper.js'; describe('Unit | Service | VerifyCertificateCode', function () { describe('#generateCertificateVerificationCode', function () {