test: E2E onglet 24h + station PARIS-MONTSOURIS (sentinelle MF API live)
Some checks are pending
Deploy info-canicule / deploy (push) Waiting to run

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) <noreply@anthropic.com>
This commit is contained in:
Florian 2026-05-26 00:43:29 +02:00
parent a007f340dc
commit 84e8bd200f

View file

@ -9,6 +9,16 @@ test.describe('Page département', () => {
await expect(page.getByRole('tab', { name: '30 jours' })).toBeVisible(); 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 }) => { test('Tabs période changent activeselected', async ({ page }) => {
await page.goto('/departement/75'); await page.goto('/departement/75');
const tab7 = page.getByRole('tab', { name: '7 jours' }); const tab7 = page.getByRole('tab', { name: '7 jours' });