Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ottaviano committed Mar 22, 2023
1 parent 23c63ad commit 2afa40b
Show file tree
Hide file tree
Showing 34 changed files with 861 additions and 852 deletions.
1 change: 1 addition & 0 deletions config/packages/api_platform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ api_platform:
metadata_backward_compatibility_layer: false
exception_to_status:
ApiPlatform\Core\Bridge\Symfony\Validator\Exception\ValidationException: 400
ApiPlatform\Exception\ItemNotFoundException: 400
formats:
json:
mime_types: ['application/json']
Expand Down
10 changes: 5 additions & 5 deletions features/api/adherent_formations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Feature:
"print_count": 0,
"visibility": "local",
"zone": {
"uuid": "e3efe5c5-906e-11eb-a875-0242ac150002",
"uuid": "@uuid@",
"code": "77",
"name": "Seine-et-Marne"
},
Expand Down Expand Up @@ -62,7 +62,7 @@ Feature:
},
"items": [
{
"uuid": "ebdbafa2-c0b0-40ff-adbd-745f48f48c42",
"uuid": "@uuid@",
"title": "Première formation du 77",
"description": "@string@",
"content_type": "file",
Expand All @@ -72,14 +72,14 @@ Feature:
"print_count": 0,
"visibility": "local",
"zone": {
"uuid": "e3efe5c5-906e-11eb-a875-0242ac150002",
"uuid": "@uuid@",
"code": "77",
"name": "Seine-et-Marne"
},
"position": 0
},
{
"uuid": "366c1da2-f833-4172-883a-c10a41588766",
"uuid": "@uuid@",
"title": "Deuxième formation du 77",
"description": "@string@",
"content_type": "link",
Expand All @@ -89,7 +89,7 @@ Feature:
"print_count": 0,
"visibility": "local",
"zone": {
"uuid": "e3efe5c5-906e-11eb-a875-0242ac150002",
"uuid": "@uuid@",
"code": "77",
"name": "Seine-et-Marne"
},
Expand Down
6 changes: 3 additions & 3 deletions features/api/adherent_messages.feature
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Feature:
"created_at": "@[email protected]()",
"sent_at": null,
"author": {
"uuid": "29461c49-2646-4d89-9c82-50b3f9b586f4",
"uuid": "@uuid@",
"first_name": "Referent",
"last_name": "Referent"
},
Expand All @@ -115,7 +115,7 @@ Feature:
"created_at": "@[email protected]()",
"sent_at": "@[email protected]()",
"author": {
"uuid": "29461c49-2646-4d89-9c82-50b3f9b586f4",
"uuid": "@uuid@",
"first_name": "Referent",
"last_name": "Referent"
},
Expand Down Expand Up @@ -245,7 +245,7 @@ Feature:
And the JSON should be equal to:
"""
{
"uuid": "969b1f08-53ec-4a7d-8d6e-7654a001b13f",
"uuid": "@uuid@",
"label": "Mon nouveau titre",
"subject": "Mon nouveau objet du mail",
"status": "draft",
Expand Down
6 changes: 3 additions & 3 deletions features/api/adherents.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Feature:
And the JSON should be equal to:
"""
{
"uuid": "2f69db3c-ecd7-4a8a-bd23-bb4c9cfd70cf",
"uuid": "@uuid@",
"email_address": "[email protected]",
"first_name": "Referent75and77",
"last_name": "Referent75and77",
Expand Down Expand Up @@ -69,7 +69,7 @@ Feature:
And the JSON should be equal to:
"""
{
"uuid":"a046adbe-9c7b-56a9-a676-6151a6785dda",
"uuid": "@uuid@",
"country":"FR",
"postal_code":"75008",
"email_address":"[email protected]",
Expand Down Expand Up @@ -756,7 +756,7 @@ Feature:
"""
When I send a "POST" request to "/api/v3/adherents/count?scope=referent" with body:
"""
["e3efe6fd-906e-11eb-a875-0242ac150002"]
["944062a9-872a-11eb-9419-42010a840019"]
"""
Then the response status code should be 200
And the JSON should be equal to:
Expand Down
14 changes: 7 additions & 7 deletions features/api/audience_segments.feature
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Feature:
"renaissance_membership": null,
"scope": "deputy",
"zone": {
"uuid": "e3f2c4a0-906e-11eb-a875-0242ac150002",
"uuid": "@uuid@",
"code": "92024",
"name": "Clichy"
},
Expand All @@ -55,7 +55,7 @@ Feature:
},
"synchronized": false,
"recipient_count": null,
"uuid": "f6c36dd7-0517-4caf-ba6f-ec6822f2ec12"
"uuid": "@uuid@"
}
"""

Expand Down Expand Up @@ -175,7 +175,7 @@ Feature:
"renaissance_membership": "others_adherent",
"scope": "deputy",
"zone": {
"uuid": "e3f0bf9d-906e-11eb-a875-0242ac150002",
"uuid": "@uuid@",
"code": "75-1",
"name": "Paris (1)"
},
Expand All @@ -201,7 +201,7 @@ Feature:
{
"filter": {
"scope": "referent",
"zone": "e3efe6fd-906e-11eb-a875-0242ac150002",
"zone": "944062a9-872a-11eb-9419-42010a840019",
"is_certified": false,
"renaissance_membership": null
}
Expand All @@ -215,7 +215,7 @@ Feature:
"is_certified": false,
"renaissance_membership": null,
"zone": {
"uuid": "e3efe6fd-906e-11eb-a875-0242ac150002",
"uuid": "@uuid@",
"code": "92",
"name": "Hauts-de-Seine"
},
Expand Down Expand Up @@ -269,7 +269,7 @@ Feature:
"renaissance_membership": "adherent_re",
"scope": "referent",
"zone": {
"uuid": "e3f21338-906e-11eb-a875-0242ac150002",
"uuid": "@uuid@",
"code": "59350",
"name": "Lille"
},
Expand All @@ -284,7 +284,7 @@ Feature:
},
"synchronized": false,
"recipient_count": null,
"uuid": "830d230f-67fb-4217-9986-1a3ed7d3d5e7"
"uuid": "@uuid@"
}
"""

Expand Down
28 changes: 14 additions & 14 deletions features/api/audiences.feature
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Feature:
"registered_since":"2017-06-29T00:00:00+02:00",
"registered_until":"2021-04-29T00:00:00+02:00",
"zone":{
"uuid":"e3f0bf9d-906e-11eb-a875-0242ac150002",
"uuid": "@uuid@",
"code":"75-1",
"name":"Paris (1)"
},
Expand Down Expand Up @@ -194,7 +194,7 @@ Feature:
"registered_since":"2018-08-28T00:00:00+02:00",
"registered_until":"2021-06-28T00:00:00+02:00",
"zone":{
"uuid":"e3f0bf9d-906e-11eb-a875-0242ac150002",
"uuid": "@uuid@",
"code":"75-1",
"name":"Paris (1)"
},
Expand All @@ -203,7 +203,7 @@ Feature:
"renaissance_membership": "others_adherent",
"has_email_subscription":false,
"has_sms_subscription":true,
"uuid":"f7ac8140-0a5b-4832-a5f4-47e661dc130c"
"uuid": "@uuid@"
}
"""

Expand Down Expand Up @@ -248,11 +248,11 @@ Feature:
[
{
"name": "Audience REFERENT avec les paramètres nécessaires",
"uuid": "4fe24658-000c-4223-87be-d09129c1e191"
"uuid": "@uuid@"
},
{
"name": "Audience REFERENT avec quelques paramètres",
"uuid": "4562e1ca-09ee-4500-96b6-a73431e40bf1"
"uuid": "@uuid@"
}
]
"""
Expand All @@ -267,11 +267,11 @@ Feature:
[
{
"name": "Audience DEPUTY avec les paramètres nécessaires",
"uuid": "bd298079-f763-4c7a-9a8a-a243d01d0e31"
"uuid": "@uuid@"
},
{
"name": "Audience DEPUTY avec tous les paramètres possibles",
"uuid": "f7ac8140-0a5b-4832-a5f4-47e661dc130c"
"uuid": "@uuid@"
}
]
"""
Expand All @@ -286,15 +286,15 @@ Feature:
[
{
"name": "Audience CANDIDATE avec les paramètres nécessaires",
"uuid": "6e1a9be9-254d-48f7-a0ab-c26f35cfa783"
"uuid": "@uuid@"
},
{
"name": "Audience CANDIDATE avec quelques paramètres",
"uuid": "aef77422-0797-40fd-a160-2c5f2ee19260"
"uuid": "@uuid@"
},
{
"name": "Audience CANDIDATE, les hommes à Paris",
"uuid": "79b2046c-1722-406e-b5b4-4ddcc0827ead"
"uuid": "@uuid@"
}
]
"""
Expand All @@ -308,7 +308,7 @@ Feature:
"""
{
"zone": {
"uuid": "e3f0bf9d-906e-11eb-a875-0242ac150002",
"uuid": "@uuid@",
"code": "75-1",
"name": "Paris (1)"
},
Expand All @@ -325,7 +325,7 @@ Feature:
"renaissance_membership": null,
"has_email_subscription": true,
"has_sms_subscription": false,
"uuid": "f7ac8140-0a5b-4832-a5f4-47e661dc130c"
"uuid": "@uuid@"
}
"""

Expand All @@ -338,7 +338,7 @@ Feature:
"""
{
"zone": {
"uuid": "e3f0bf9d-906e-11eb-a875-0242ac150002",
"uuid": "@uuid@",
"code": "75-1",
"name": "Paris (1)"
},
Expand All @@ -355,6 +355,6 @@ Feature:
"renaissance_membership": null,
"has_email_subscription": null,
"has_sms_subscription": null,
"uuid": "bd298079-f763-4c7a-9a8a-a243d01d0e31"
"uuid": "@uuid@"
}
"""
Loading

0 comments on commit 2afa40b

Please sign in to comment.