Skip to content

Commit

Permalink
Fix tests 4
Browse files Browse the repository at this point in the history
  • Loading branch information
ottaviano committed Jan 31, 2025
1 parent 16dceb2 commit 39f4d42
Show file tree
Hide file tree
Showing 35 changed files with 75 additions and 104 deletions.
2 changes: 0 additions & 2 deletions features/api/adherents.feature
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "nickname",
Expand All @@ -60,7 +59,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "nickname",
Expand Down
1 change: 0 additions & 1 deletion features/api/audiences.feature
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "zone",
Expand Down
7 changes: 3 additions & 4 deletions features/api/committees.feature
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "zones",
Expand Down Expand Up @@ -479,7 +478,7 @@ Feature:
"""
Then the response status code should be 400
And the response should be in JSON
And the JSON node "detail" should be equal to "Vous ne pouvez pas créer de liste sur une élection en cours"
And the JSON node "violations[0].message" should be equal to "Vous ne pouvez pas créer de liste sur une élection en cours"

Examples:
| user | scope |
Expand Down Expand Up @@ -624,7 +623,7 @@ Feature:
"""
Then the response status code should be 400
And the response should be in JSON
And the JSON node "detail" should be equal to "Vous ne pouvez pas créer de candidature sur une élection en cours"
And the JSON node "violations[0].message" should be equal to "Vous ne pouvez pas créer de candidature sur une élection en cours"

Examples:
| user | scope |
Expand Down Expand Up @@ -654,7 +653,7 @@ Feature:
"""
Then the response status code should be 400
And the response should be in JSON
And the JSON node "detail" should be equal to "committee_membership: L'adhérent ne fait pas partie de votre zone de couverture."
And the JSON node "violations[0].message" should be equal to "L'adhérent ne fait pas partie de votre zone de couverture."

Examples:
| user | scope |
Expand Down
2 changes: 0 additions & 2 deletions features/api/department_sites.feature
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "zone",
Expand Down Expand Up @@ -125,7 +124,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "zone",
Expand Down
3 changes: 1 addition & 2 deletions features/api/designations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "custom_title",
Expand Down Expand Up @@ -59,7 +58,7 @@ Feature:
"""
Then the response status code should be 400
And the response should be in JSON
And the JSON node "detail" should be equal to "election_entity_identifier: Un identifiant est requis pour ce champs."
And the JSON node "violations[0].message" should be equal to "Un identifiant est requis pour ce champs."

Examples:
| user | scope |
Expand Down
2 changes: 0 additions & 2 deletions features/api/events.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1130,7 +1130,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"message": "Catégorie est requise.",
Expand Down Expand Up @@ -1185,7 +1184,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"message": "La date de fin de l'événement doit être postérieure à la date de début.",
Expand Down
3 changes: 0 additions & 3 deletions features/api/jecoute_news.feature
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "text",
Expand Down Expand Up @@ -782,7 +781,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "text",
Expand Down Expand Up @@ -1290,7 +1288,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "zone",
Expand Down
8 changes: 1 addition & 7 deletions features/api/jecoute_ripostes.feature
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "title",
Expand All @@ -283,7 +282,7 @@ Feature:
"""
{
"title": "Une nouvelle riposte d'aujourd'hui - Une nouvelle riposte d'aujourd'hui - Une nouvelle riposte d'aujourd'hui - Une nouvelle riposte d'aujourd'hui - Une nouvelle riposte d'aujourd'hui - Une nouvelle riposte d'aujourd'hui - Une nouvelle riposte d'aujourd'hui",
"with_notification": "true"
"with_notification": true
}
"""
Then the response status code should be 400
Expand All @@ -293,7 +292,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "title",
Expand All @@ -306,10 +304,6 @@ Feature:
{
"propertyPath": "source_url",
"message": "Cette valeur ne doit pas être vide."
},
{
"propertyPath": "with_notification",
"message": "Cette valeur doit être de type bool."
}
]
}
Expand Down
7 changes: 0 additions & 7 deletions features/api/membership_avecvous.feature
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "cgu_accepted",
Expand All @@ -531,7 +530,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "phone",
Expand All @@ -555,7 +553,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "birthdate",
Expand All @@ -581,7 +578,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "post_address.address",
Expand All @@ -607,7 +603,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "post_address.postal_code",
Expand All @@ -633,7 +628,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "post_address.city_name",
Expand All @@ -659,7 +653,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "post_address.country",
Expand Down
4 changes: 0 additions & 4 deletions features/api/my_teams.feature
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "role",
Expand All @@ -105,7 +104,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "adherent",
Expand Down Expand Up @@ -136,7 +134,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "adherent",
Expand All @@ -163,7 +160,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "adherent",
Expand Down
1 change: 0 additions & 1 deletion features/api/pap_address.feature
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "type",
Expand Down
6 changes: 0 additions & 6 deletions features/api/pap_campaigns.feature
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "vote_places",
Expand Down Expand Up @@ -957,7 +956,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"message": "La campagne a déjà commencé, vous ne pouvez pas changer le questionnaire.",
Expand Down Expand Up @@ -1507,7 +1505,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "building",
Expand Down Expand Up @@ -1591,7 +1588,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "status",
Expand Down Expand Up @@ -1663,7 +1659,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "title",
Expand Down Expand Up @@ -1704,7 +1699,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "goal",
Expand Down
5 changes: 0 additions & 5 deletions features/api/phoning_campaigns.feature
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"message": "Un rôle national ne peut pas définir de zone.",
Expand Down Expand Up @@ -647,7 +646,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "zone",
Expand Down Expand Up @@ -709,7 +707,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "zone",
Expand Down Expand Up @@ -1138,7 +1135,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "status",
Expand Down Expand Up @@ -1633,7 +1629,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "title",
Expand Down
2 changes: 0 additions & 2 deletions features/api/report.feature
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ Feature:
"type": "@[email protected]()",
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "comment",
Expand All @@ -89,7 +88,6 @@ Feature:
"type": "@[email protected]()",
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "reasons",
Expand Down
5 changes: 2 additions & 3 deletions features/api/surveys.feature
Original file line number Diff line number Diff line change
Expand Up @@ -1232,7 +1232,7 @@ Feature:
}
"""
Then the response status code should be 400
And the JSON node "detail" should be equal to "Vous ne pouvez pas créer ou modifier un questionnaire de type local avec le scope national."
And the JSON node "violations[0].message" should be equal to "Vous ne pouvez pas créer ou modifier un questionnaire de type local avec le scope national."

Scenario: As a user with national scope I cannot create a local survey
Given I am logged with "[email protected]" via OAuth client "JeMengage Web"
Expand Down Expand Up @@ -1287,7 +1287,7 @@ Feature:
}
"""
Then the response status code should be 400
And the JSON node "detail" should be equal to "Vous ne pouvez pas créer ou modifier un questionnaire de type national avec le scope president_departmental_assembly."
And the JSON node "violations[0].message" should be equal to "Vous ne pouvez pas créer ou modifier un questionnaire de type national avec le scope president_departmental_assembly."

Scenario: As a user with national role I can create a national survey
Given I am logged with "[email protected]" via OAuth client "JeMengage Web"
Expand Down Expand Up @@ -1947,7 +1947,6 @@ Feature:
{
"message": "Validation Failed",
"status": "error",
"violations": [
{
"propertyPath": "questions",
Expand Down
Loading

0 comments on commit 39f4d42

Please sign in to comment.