Keep rating value in interface typeface

codex/redisenio-dominio-musical
dev 4 weeks ago
parent 94dcf2eea5
commit 4ce062fbb5

@ -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 });

@ -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);

Loading…
Cancel
Save

Powered by TurnKey Linux.