Skip to content

Commit

Permalink
feat (#1110): functional test
Browse files Browse the repository at this point in the history
Profil speaker :
- Accès à la page
- Saisie des infos
  • Loading branch information
stakovicz committed Nov 7, 2023
1 parent 16647b2 commit 094ee12
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Resources/views/event/speaker/page.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
{{ form_errors(speakers_contact_form.phone_number) }}
</span>
<span>
{{ form_widget(speakers_contact_form.submit) }}
{{ form_widget(speakers_contact_form.submit, {attr: {title: "Enregistrer le contact"}}) }}
</span>
</div>

Expand Down Expand Up @@ -150,7 +150,7 @@
</div>

<div class="submit-container">
{{ form_widget(speakers_diner_form.submit) }}
{{ form_widget(speakers_diner_form.submit, {attr: {title: "Enregistrer mes préférences pour le restaurant"}}) }}
</div>

{{ form_end(speakers_diner_form) }}
Expand Down Expand Up @@ -196,7 +196,7 @@
</div>

<div class="submit-container">
{{ form_widget(hotel_reservation_form.submit) }}
{{ form_widget(hotel_reservation_form.submit, {attr: {title: "Enregistrer les nuitées"}}) }}
</div>

{{ form_end(hotel_reservation_form) }}
Expand Down
9 changes: 9 additions & 0 deletions sources/AppBundle/Security/TestGithubAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ private function getTestUsersDetails()
'avatar_url' => 'http://test2.com',
];

$testUsers['agallou'] = [
'id' => 320372,
'name' => 'agallou',
'login' => 'agallou',
'company' => 'AFUP',
'html_url' => 'http://test2.com',
'avatar_url' => 'http://test2.com',
];

return $testUsers;
}

Expand Down
34 changes: 34 additions & 0 deletions tests/behat/features/EventPages/SpeakerInfos.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Feature: Event > Profil speaker

@reloadDbWithTestData
Scenario: Accès à la page
Given I go to "/event/forum/speaker-infos"
When I follow "Connect as agallou"
Then I should see "Votre conférence"
Then I should see "Nous vous défrayons"

@reloadDbWithTestData
Scenario: Saisie des infos
Given I go to "/event/forum/speaker-infos"
When I follow "Connect as agallou"
Then I fill in "speakers_contact[phone_number]" with "0123456789"
And I press "Enregistrer le contact"
Then I should see "Informations de contact enregistrées"

Then I fill in "speakers_diner[will_attend]" with "1"
Then I fill in "speakers_diner[has_special_diet]" with "1"
Then I fill in "speakers_diner[special_diet_description]" with "Je suis végétarien"
And I press "Enregistrer mes préférences pour le restaurant"
Then I should see "Informations sur votre venue au restaurant des speakers enregistrées"
Then I should see "Je suis végétarien"

When I check "hotel_reservation_nights_0"
And I press "Enregistrer les nuitées"
Then I should see "Informations sur votre venue à l'hôtel enregistrées"
Then the "hotel_reservation_nights_0" checkbox is checked

When I attach the file "test_file1.pdf" to "speakers_expenses[files][]"
Then I should see "Aucun fichier"
And I press "Ajouter des fichiers"
When I should see "Fichiers ajoutés"
Then I should see "test_file1.pdf"

0 comments on commit 094ee12

Please sign in to comment.