Skip to content

Commit

Permalink
corrige l'enregistrement des venues speakers
Browse files Browse the repository at this point in the history
  • Loading branch information
stakovicz committed Dec 31, 2024
1 parent 12c0ec8 commit f5e7c37
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sources/AppBundle/Event/Speaker/SpeakerPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ static function (Talk $talk) {

if ($shouldDisplaySpeakersDinerForm && $speakersDinerType->isValid()) {
$speakersDinerData = $speakersDinerType->getData();
$speaker->setWillAttendSpeakersDiner($speakersDinerData['will_attend']);
$speaker->setHasSpecialDiet($speakersDinerData['has_special_diet']);
$speaker->setWillAttendSpeakersDiner($speakersDinerData['will_attend'] === 1);
$speaker->setHasSpecialDiet($speakersDinerData['has_special_diet'] === 1);
$speaker->setSpecialDietDescription($speakersDinerData['special_diet_description']);
$this->speakerRepository->save($speaker);
$this->flashBag->add('notice', 'Informations sur votre venue au restaurant des speakers enregistrées');
Expand Down
6 changes: 5 additions & 1 deletion tests/behat/features/EventPages/SpeakerInfos.feature
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ Feature: Event > Profil speaker
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"
And the "speakers_diner_will_attend_0" checkbox should be checked
And the "speakers_diner_will_attend_1" checkbox should be unchecked
And the "speakers_diner_has_special_diet_0" checkbox should be unchecked
And the "speakers_diner_has_special_diet_1" checkbox should be checked
And I should see "Je suis végétarien"

When I check "hotel_reservation_nights_0"
And I press "Enregistrer les nuitées"
Expand Down

0 comments on commit f5e7c37

Please sign in to comment.