fix(lbac-2360): remove referrer from api V2 contract #5538
preview.yml
on: pull_request
tests
/
Tests
3m 26s
Add deploy comment
2s
Annotations
10 errors and 2 warnings
helpers/openapi/generateOpenapi.test.ts > generateOpenApiSchema > should generate proper schema:
shared/helpers/openapi/generateOpenapi.test.ts#L8
Error: Snapshot `generateOpenApiSchema > should generate proper schema 1` mismatched
- Expected
+ Received
@@ -7231,63 +7231,38 @@
"additionalProperties": false,
"properties": {
"parcoursup_id": {
"type": "string",
},
- "referrer": {
- "enum": [
- "parcoursup",
- ],
- "type": "string",
- },
},
"required": [
"parcoursup_id",
- "referrer",
],
"type": "object",
},
{
"additionalProperties": false,
"properties": {
"onisep_id": {
"description": "Identifiant ONISEP utilisé avec le mapping de la collection referentielonisep",
"type": "string",
},
- "referrer": {
- "enum": [
- "onisep",
- ],
- "type": "string",
- },
},
"required": [
"onisep_id",
- "referrer",
],
"type": "object",
},
{
"additionalProperties": false,
"properties": {
"cle_ministere_educatif": {
- "type": "string",
- },
- "referrer": {
- "enum": [
- "parcoursup",
- "lba",
- "onisep",
- "jeune_1_solution",
- "affelnet",
- ],
"type": "string",
},
},
"required": [
"cle_ministere_educatif",
- "referrer",
],
"type": "object",
},
],
},
❯ helpers/openapi/generateOpenapi.test.ts:8:15
|
src/http/controllers/v2/appointment.controller.v2.test.ts > POST /v2/appointment > Return 200 + error object if appointment is not available:
server/src/http/controllers/v2/appointment.controller.v2.test.ts#L63
AssertionError: expected 400 to deeply equal 200
- Expected
+ Received
- 200
+ 400
❯ src/http/controllers/v2/appointment.controller.v2.test.ts:63:38
|
src/http/controllers/v2/appointment.controller.v2.test.ts > POST /v2/appointment > Return 200 + error object if appointment is not available:
server/src/http/controllers/v2/appointment.controller.v2.test.ts#L64
AssertionError: expected { statusCode: 400, …(3) } to deeply equal { Object (error) }
- Expected
+ Received
Object {
- "error": "Appointment request not available",
+ "data": Object {
+ "validationError": Object {
+ "code": "FST_ERR_VALIDATION",
+ "issues": Array [
+ Object {
+ "code": "unrecognized_keys",
+ "keys": Array [
+ "referrer",
+ ],
+ "message": "Unrecognized key(s) in object: 'referrer'",
+ "path": Array [],
+ },
+ ],
+ "name": "ZodError",
+ "statusCode": 400,
+ "validationContext": "body",
+ },
+ },
+ "error": "Bad Request",
+ "message": "body.: Unrecognized key(s) in object: 'referrer'",
+ "statusCode": 400,
}
❯ src/http/controllers/v2/appointment.controller.v2.test.ts:64:34
|
src/http/controllers/v2/appointment.controller.v2.test.ts > POST /v2/appointment > Return 200 using PARCOURSUP ID:
server/src/http/controllers/v2/appointment.controller.v2.test.ts#L80
AssertionError: expected 400 to deeply equal 200
- Expected
+ Received
- 200
+ 400
❯ src/http/controllers/v2/appointment.controller.v2.test.ts:80:38
|
src/http/controllers/v2/appointment.controller.v2.test.ts > POST /v2/appointment > Return 200 using PARCOURSUP ID:
server/src/http/controllers/v2/appointment.controller.v2.test.ts#L81
AssertionError: expected { statusCode: 400, …(3) } to deeply equal { cfd: '32025001', …(8) }
- Expected
+ Received
Object {
- "cfd": "32025001",
- "cle_ministere_educatif": "088281P01313885594860007038855948600070-67118#L01",
- "code_postal": "93290",
- "etablissement_formateur_entreprise_raison_sociale": "AFORP FORMATION",
- "etablissement_formateur_siret": "77572845400205",
- "form_url": StringMatching /^https?:\/\/[^/]+\/espace-pro/,
- "intitule_long": "ASSISTANCE TECHNIQUE D'INGENIEUR (BTS)",
- "lieu_formation_adresse": "64 Avenue de la Plaine de France",
- "localite": "Tremblay-en-France",
+ "data": Object {
+ "validationError": Object {
+ "code": "FST_ERR_VALIDATION",
+ "issues": Array [
+ Object {
+ "code": "unrecognized_keys",
+ "keys": Array [
+ "referrer",
+ ],
+ "message": "Unrecognized key(s) in object: 'referrer'",
+ "path": Array [],
+ },
+ ],
+ "name": "ZodError",
+ "statusCode": 400,
+ "validationContext": "body",
+ },
+ },
+ "error": "Bad Request",
+ "message": "body.: Unrecognized key(s) in object: 'referrer'",
+ "statusCode": 400,
}
❯ src/http/controllers/v2/appointment.controller.v2.test.ts:81:34
|
src/http/controllers/v2/appointment.controller.v2.test.ts > POST /v2/appointment > Return 200 using ONISEP ID:
server/src/http/controllers/v2/appointment.controller.v2.test.ts#L104
AssertionError: expected 400 to deeply equal 200
- Expected
+ Received
- 200
+ 400
❯ src/http/controllers/v2/appointment.controller.v2.test.ts:104:38
|
src/http/controllers/v2/appointment.controller.v2.test.ts > POST /v2/appointment > Return 200 using ONISEP ID:
server/src/http/controllers/v2/appointment.controller.v2.test.ts#L105
AssertionError: expected { statusCode: 400, …(3) } to deeply equal { cfd: '32025001', …(8) }
- Expected
+ Received
Object {
- "cfd": "32025001",
- "cle_ministere_educatif": "088281P01313885594860007038855948600070-67118#L01",
- "code_postal": "93290",
- "etablissement_formateur_entreprise_raison_sociale": "AFORP FORMATION",
- "etablissement_formateur_siret": "77572845400205",
- "form_url": StringMatching /^https?:\/\/[^/]+\/espace-pro/,
- "intitule_long": "ASSISTANCE TECHNIQUE D'INGENIEUR (BTS)",
- "lieu_formation_adresse": "64 Avenue de la Plaine de France",
- "localite": "Tremblay-en-France",
+ "data": Object {
+ "validationError": Object {
+ "code": "FST_ERR_VALIDATION",
+ "issues": Array [
+ Object {
+ "code": "unrecognized_keys",
+ "keys": Array [
+ "referrer",
+ ],
+ "message": "Unrecognized key(s) in object: 'referrer'",
+ "path": Array [],
+ },
+ ],
+ "name": "ZodError",
+ "statusCode": 400,
+ "validationContext": "body",
+ },
+ },
+ "error": "Bad Request",
+ "message": "body.: Unrecognized key(s) in object: 'referrer'",
+ "statusCode": 400,
}
❯ src/http/controllers/v2/appointment.controller.v2.test.ts:105:34
|
src/http/controllers/v2/appointment.controller.v2.test.ts > POST /v2/appointment > Return 200 using CLE MINISTERE EDUCATIVE:
server/src/http/controllers/v2/appointment.controller.v2.test.ts#L129
AssertionError: expected 400 to deeply equal 200
- Expected
+ Received
- 200
+ 400
❯ src/http/controllers/v2/appointment.controller.v2.test.ts:129:38
|
src/http/controllers/v2/appointment.controller.v2.test.ts > POST /v2/appointment > Return 200 using CLE MINISTERE EDUCATIVE:
server/src/http/controllers/v2/appointment.controller.v2.test.ts#L130
AssertionError: expected { statusCode: 400, …(3) } to deeply equal { cfd: '32025001', …(8) }
- Expected
+ Received
Object {
- "cfd": "32025001",
- "cle_ministere_educatif": "088281P01313885594860007038855948600070-67118#L01",
- "code_postal": "93290",
- "etablissement_formateur_entreprise_raison_sociale": "AFORP FORMATION",
- "etablissement_formateur_siret": "77572845400205",
- "form_url": StringMatching /^https?:\/\/[^/]+\/espace-pro/,
- "intitule_long": "ASSISTANCE TECHNIQUE D'INGENIEUR (BTS)",
- "lieu_formation_adresse": "64 Avenue de la Plaine de France",
- "localite": "Tremblay-en-France",
+ "data": Object {
+ "validationError": Object {
+ "code": "FST_ERR_VALIDATION",
+ "issues": Array [
+ Object {
+ "code": "unrecognized_keys",
+ "keys": Array [
+ "referrer",
+ ],
+ "message": "Unrecognized key(s) in object: 'referrer'",
+ "path": Array [],
+ },
+ ],
+ "name": "ZodError",
+ "statusCode": 400,
+ "validationContext": "body",
+ },
+ },
+ "error": "Bad Request",
+ "message": "body.: Unrecognized key(s) in object: 'referrer'",
+ "statusCode": 400,
}
❯ src/http/controllers/v2/appointment.controller.v2.test.ts:130:34
|
tests / Tests
Process completed with exit code 1.
|
Add deploy comment
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|
tests / Tests
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|