From aec567f975ab340664d7394318585a5fcf7e6476 Mon Sep 17 00:00:00 2001 From: Lealefoulon <116151499+Lealefoulon@users.noreply.github.com> Date: Mon, 6 Jan 2025 16:44:14 +0100 Subject: [PATCH 1/2] Correction valeur tonnage dans la dropdowm (#1130) * correction valeur tonnage * test --- .../Form/Regulation/VehicleSetFormType.php | 12 +++++----- .../Fragments/AddMeasureControllerTest.php | 22 +++++++++++++++++++ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/src/Infrastructure/Form/Regulation/VehicleSetFormType.php b/src/Infrastructure/Form/Regulation/VehicleSetFormType.php index 16cbd64cb..65f776949 100644 --- a/src/Infrastructure/Form/Regulation/VehicleSetFormType.php +++ b/src/Infrastructure/Form/Regulation/VehicleSetFormType.php @@ -44,12 +44,12 @@ public function buildForm(FormBuilderInterface $builder, array $options): void ChoiceType::class, options : [ 'choices' => [ - 3.5 => 3.5, - 7.5 => 7.5, - 19 => 19, - 26 => 26, - 32 => 32, - 44 => 44, + '3.5' => 3.5, + '7.5' => 7.5, + '19' => 19, + '26' => 26, + '32' => 32, + '44' => 44, ], 'label' => 'regulation.vehicle_set.heavyweightMaxWeight', 'placeholder' => 'regulation.vehicle_set.heavyweightMaxWeight.placeholder', diff --git a/tests/Integration/Infrastructure/Controller/Regulation/Fragments/AddMeasureControllerTest.php b/tests/Integration/Infrastructure/Controller/Regulation/Fragments/AddMeasureControllerTest.php index d004f4ed8..0908d9966 100644 --- a/tests/Integration/Infrastructure/Controller/Regulation/Fragments/AddMeasureControllerTest.php +++ b/tests/Integration/Infrastructure/Controller/Regulation/Fragments/AddMeasureControllerTest.php @@ -727,6 +727,28 @@ public function testInvalidBlankCritairTypes(): void $this->assertStringContainsString('Cette valeur ne doit pas ĂȘtre vide.', $crawler->filter('#measure_form_vehicleSet_critairTypes_error')->text()); } + public function testHeavyweightMaxWeightChoices(): void + { + $client = $this->login(); + $crawler = $client->request('GET', '/_fragment/regulations/' . RegulationOrderRecordFixture::UUID_PERMANENT . '/measure/add'); + $this->assertResponseStatusCodeSame(200); + $this->assertSecurityHeaders(); + + $choices = $crawler + ->filter('select[name="measure_form[vehicleSet][heavyweightMaxWeight]"] > option') + ->each(fn ($node) => [$node->attr('value'), $node->text()]); + + $this->assertEquals([ + ['', 'SĂ©lectionner le poids'], + ['3.5', 3.5], + ['7.5', 7.5], + ['19', 19], + ['26', 26], + ['32', 32], + ['44', 44], + ], $choices); + } + public function testInvalidCritairTypes(): void { $client = $this->login(); From 1ef6e0539f8224b914bf6e0f3733b359977c274d Mon Sep 17 00:00:00 2001 From: Florimond Manca Date: Tue, 7 Jan 2025 10:31:27 +0100 Subject: [PATCH 2/2] Utilise PHP 8.2 dans export Metabase (#1131) --- .github/workflows/metabase_export.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/metabase_export.yml b/.github/workflows/metabase_export.yml index d27624b58..8d18421c2 100644 --- a/.github/workflows/metabase_export.yml +++ b/.github/workflows/metabase_export.yml @@ -12,6 +12,11 @@ jobs: steps: - uses: actions/checkout@v1 + - name: Setup PHP with PECL extension + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + - name: Install Scalingo CLI run: curl -O https://cli-dl.scalingo.com/install && bash install