Skip to content

Commit

Permalink
feat (afup#1110): functional test
Browse files Browse the repository at this point in the history
Espace membre:
- Présence AG
- Saisie infos fiche entreprise publique
  • Loading branch information
stakovicz committed Nov 1, 2023
1 parent 3d6e03f commit 95f5995
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/Resources/views/site/member/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
</a>
<span class="member-index-item--title">Mes coordonnées</span> : {{ user.label }}
<div class="member-index-item--link">
<a class="button-inverted button__medium" href="{{ href }}">Modifier</a>
<a class="button-inverted button__medium" href="{{ href }}"
title="Modifier les coordonnées">Modifier</a>
</div>
<div class="member-index-item--description">
Modifiez votre adresse de facturation et votre adresse email, changez votre mot de passe
Expand Down
11 changes: 11 additions & 0 deletions db/seeds/GeneralMeetings.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ class GeneralMeetings extends AbstractSeed
{
public function run()
{
$timestamp = strtotime(date("Y-m-d") . "+2 months");

// Assemblées générales
$data = [
[
'date' => 1635544800,
'description' => 'Assemblée octobre 2021'
],
[
'date' => $timestamp,
'description' => 'Assemblée dans 2 mois'
],
];

$table = $this->table('afup_assemblee_generale');
Expand All @@ -28,6 +34,11 @@ public function run()
'date' => 1635544800,
'presence' => 1
],
[
'id_personne_physique' => '1',
'date' => $timestamp,
'presence' => 1
],
];

$table = $this->table('afup_presences_assemblee_generale');
Expand Down
20 changes: 20 additions & 0 deletions tests/behat/features/MembersArea/GeneralMeeting.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Feature: Espace membre, Assemblée Générale
@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"
When I follow "Indiquer ma présence"
Then I should see "Ma participation à l'Assemblée Générale"
And I should see "Vous ne pourrez donc pas voter lors de cette assemblée générale."

@reloadDbWithTestData
Scenario: Indiquer présent
Given I am logged-in with the user "paul" and the password "paul"
And I follow "Espace membre"
Then I should see "Espace membre"
When I follow "Indiquer ma présence"
Then I should see "Ma participation à l'Assemblée Générale du"
When I select "2" from "form[presence]"
And I press "Confirmer"
Then I should see "La présence et le pouvoir ont été modifiés"
20 changes: 20 additions & 0 deletions tests/behat/features/MembersArea/MemberContact.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Feature: Espace membre > Personne physique > Coordonnées

@reloadDbWithTestData
Scenario: Invitation des membres
Given I am logged-in with the user "paul" and the password "paul"
When I follow "Espace membre"
Then I should see "Espace membre"
And I should see "Antenne la plus proche : Aucune"
When I follow "Modifier les coordonnées"
Then I should see "Mes coordonnées"
When I fill in "contact_details[email]" with "[email protected]"
And I fill in "contact_details[address]" with "Rue du chemin"
And I fill in "contact_details[zipcode]" with "75000"
And I fill in "contact_details[city]" with "Ville"
And I select "FR" from "contact_details[country]"
And I select "bordeaux" from "contact_details[nearest_office]"
When I press "contact_details_save"
Then I should see "Votre compte a été modifié !"
When I follow "Accueil"
And I should see "Antenne la plus proche : Bordeaux"

0 comments on commit 95f5995

Please sign in to comment.