From 84e8bd200f36ea451e01fbac60e31262d580f433 Mon Sep 17 00:00:00 2001 From: Florian Date: Tue, 26 May 2026 00:43:29 +0200 Subject: [PATCH] test: E2E onglet 24h + station PARIS-MONTSOURIS (sentinelle MF API live) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 27/27 tests passent en live, incl la nouvelle assertion que l API Météo France répond bien avec le hourly + le mapping station résolu. Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/e2e/departement.spec.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/e2e/departement.spec.ts b/tests/e2e/departement.spec.ts index fde51fc..d752af7 100644 --- a/tests/e2e/departement.spec.ts +++ b/tests/e2e/departement.spec.ts @@ -9,6 +9,16 @@ test.describe('Page département', () => { await expect(page.getByRole('tab', { name: '30 jours' })).toBeVisible(); }); + test('Onglet 24h actif si API Météo France hourly OK', async ({ page }) => { + await page.goto('/departement/75'); + const tab24 = page.getByRole('tab', { name: '24 h' }); + // L'onglet n'apparaît que si hourly fetch a réussi → bonne sentinelle E2E que MF API marche + await expect(tab24).toBeVisible(); + await expect(tab24).toHaveAttribute('aria-selected', 'true'); // default si dispo + // Station label visible (preuve que stationName est résolu depuis le JSON mapping) + await expect(page.getByText(/station PARIS-MONTSOURIS/i)).toBeVisible(); + }); + test('Tabs période changent activeselected', async ({ page }) => { await page.goto('/departement/75'); const tab7 = page.getByRole('tab', { name: '7 jours' });