diff --git a/e2e/musica.e2e.ts b/e2e/musica.e2e.ts index b055ced..fe692ca 100644 --- a/e2e/musica.e2e.ts +++ b/e2e/musica.e2e.ts @@ -151,13 +151,19 @@ test.describe('Página de música', () => { await expect(valoracion.getByRole('heading')).toHaveCount(0); await expect(valoracion).not.toContainText(/valoración|de 5|votos?|quitar mi voto/i); + const numeroValoracion = valoracion.locator('.media'); const estrellas = await valoracion.locator('.estrellas').boundingBox(); - const puntuacion = await valoracion.locator('.media').boundingBox(); + const puntuacion = await numeroValoracion.boundingBox(); expect(estrellas).not.toBeNull(); expect(puntuacion).not.toBeNull(); const centroEstrellas = (estrellas?.y ?? 0) + (estrellas?.height ?? 0) / 2; const centroPuntuacion = (puntuacion?.y ?? 0) + (puntuacion?.height ?? 0) / 2; expect(Math.abs(centroEstrellas - centroPuntuacion)).toBeLessThan(2); + const familiaNumero = await numeroValoracion.evaluate( + (elemento) => getComputedStyle(elemento).fontFamily + ); + expect(familiaNumero).toContain('Archivo'); + expect(familiaNumero).not.toContain('Newsreader'); const favorito = cabecera.getByRole('link', { name: /añadir a favoritos/i }); const lista = cabecera.getByRole('link', { name: /añadir a una lista de reproducción/i }); diff --git a/src/lib/components/Valoracion.svelte b/src/lib/components/Valoracion.svelte index 0d4a7b3..3fb80a9 100644 --- a/src/lib/components/Valoracion.svelte +++ b/src/lib/components/Valoracion.svelte @@ -107,6 +107,7 @@ .media { margin: 0; font-size: var(--fs-lg); + /* Es un dato de interfaz, no un titular editorial. */ font-family: var(--font-body); font-variant-numeric: tabular-nums; color: var(--c-accent);