Skip to content

Commit

Permalink
feat (#1110): functional test
Browse files Browse the repository at this point in the history
Espace membres > Inscription veille
  • Loading branch information
stakovicz committed Oct 28, 2023
1 parent 634d433 commit d61ab6f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
8 changes: 8 additions & 0 deletions db/seeds/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ public function run()
'montant' => 150,
'date_fin' => $dateDebutUserExpire + $oneMonthInSeconds * 12,
'numero_facture' => 'COTIS-2018-201',
],
[
'date_debut' => $dateDebutUserExpire,
'type_personne' => 0, // AFUP_COTISATION_MORALE
'id_personne' => self::ID_USER_PERSONNE_PHYSIQUE,
'montant' => 25,
'date_fin' => $now + $oneMonthInSeconds * 12,
'numero_facture' => 'COTIS-'.date('Y').'-201',
]
];

Expand Down
36 changes: 36 additions & 0 deletions tests/behat/features/MembersArea/Techletter.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Feature: Espace membre, Veille de l'AFUP

@reloadDbWithTestData
Scenario: Non à jour de cotisation
Given I am logged-in with the user "userexpire" and the password "userexpire"
And I follow "Espace membre"
Then I should see "Espace membre"
And I follow "Consulter"
Then I should see "Veille de l'AFUP"
And I should see "Vous n'êtes pas à jour de votre cotisation."
And I should see "Vous ne pourrez donc pas recevoir, vous inscrire ni consulter l'historique des veilles de l'AFUP."

@reloadDbWithTestData
Scenario: Abonnement à jour je dois voir l'historique
Given I am logged-in with the user "paul" and the password "paul"
And I follow "Espace membre"
Then I should see "Espace membre"
And I follow "Gérer mon abonnement"
Then I should see "Historique des veilles"

@reloadDbWithTestData
Scenario: Abonnement / désabonnement
Given I am logged-in with the user "paul" and the password "paul"
And I follow "Espace membre"
Then I should see "Espace membre"
And I follow "Gérer mon abonnement"
Then I should see "Veille de l'AFUP"
And I should see "Vous ne recevez actuellement pas la veille de l'AFUP."
# Abonnement
Then I press "M'abonner"
And I should see "Vous êtes maintenant abonné à la veille de l'AFUP"
And I should see "Vous recevez actuellement la veille de l'AFUP deux fois par mois sur l'adresse paul.personne@mycorp.fr."
# Désabonnment
Then I follow "Me désabonner"
And I should see "Vous êtes maintenant désabonné à la veille de l'AFUP"
And I should see "Vous ne recevez actuellement pas la veille de l'AFUP."

0 comments on commit d61ab6f

Please sign in to comment.