fix(alarma-sonando): add the schedule pill and restyle the station name

Audit 9.3 (t4 line 415): the ringing screen never showed its schedule
pill. Reuses the alarmScheduleOnce/alarmScheduleWeekdays ARB keys that
already existed with no consumer, plus a new alarmScheduleDaily key
(translated to all 13 locales) for the recurring-alarm case shown in
the prototype.

Audit 9.7 (t4 line 423): the station name was cardTitle (14.5px/w700),
5.5px and 100 weight units under the prototype's 20px/w800.

Audit 9.9 (snooze tiles as number-over-unit) is intentionally NOT
included in this commit: it would require the tile to stop rendering
as a single flat "{minutes} min" Text node, which is exactly what
pantalla_alarma_sonando_dismiss_guard_test.dart taps via
find.text(l10n.alarmSnoozeOptionLabel(N)) in four places. That file
must stay untouched, so this restyle is deferred pending a decision
on how to restructure the tap target safely.
This commit is contained in:
2026-07-29 23:33:17 +02:00
parent dcb716cbc3
commit 9840205a83
29 changed files with 215 additions and 1 deletions
@@ -11,6 +11,7 @@ import 'package:pluriwave/pantallas/pantalla_alarma_sonando.dart';
import 'package:pluriwave/servicios/servicio_alarmas.dart';
import 'package:pluriwave/servicios/servicio_alarmas_android.dart';
import 'package:pluriwave/servicios/servicio_audio.dart';
import 'package:pluriwave/tema/pluriwave_tokens.dart';
import 'package:provider/provider.dart';
import 'package:shared_preferences/shared_preferences.dart';
@@ -282,6 +283,63 @@ void main() {
);
});
group('visual fidelity (audit 9.3, proto t4 line 415): pildora de '
'programacion', () {
testWidgets('alarma diaria: pildora "Cada manana" con icono alarm y acento '
'warmCoral', (tester) async {
await _montarPantalla(tester); // tipoProgramacion: diaria (fixture)
final pildora = find.byKey(const ValueKey('ringing-schedule-pill'));
expect(pildora, findsOneWidget);
expect(
find.descendant(
of: pildora,
matching: find.text(l10n.alarmScheduleDaily),
),
findsOneWidget,
reason: 'prototype t4 line 415: "CADA MAÑANA"',
);
expect(
find.descendant(of: pildora, matching: find.byIcon(Icons.alarm)),
findsOneWidget,
);
final caja = tester.widget<DecoratedBox>(pildora);
final decoracion = caja.decoration as BoxDecoration;
const acento = PluriWaveTokens.dark;
expect(
decoracion.color,
acento.warmCoral.withValues(alpha: 0.16),
reason: 'prototype t4 line 415: rgba(244,184,96,.16)',
);
expect(
decoracion.borderRadius,
BorderRadius.circular(999),
reason: 'prototype t4 line 415: border-radius:999px (pill)',
);
expect(
(decoracion.border as Border).top.color,
acento.warmCoral.withValues(alpha: 0.45),
reason: 'prototype t4 line 415: border rgba(244,184,96,.45)',
);
});
});
group('visual fidelity (audit 9.7, proto t4 line 423): nombre de emisora '
'20/w800', () {
testWidgets(
'el nombre de la emisora es 20px/w800/ls-.3, no cardTitle (14.5/w700)',
(tester) async {
await _montarPantalla(tester);
final texto = tester.widget<Text>(find.text('Radio Uno'));
expect(texto.style?.fontSize, 20);
expect(texto.style?.fontWeight, FontWeight.w800);
expect(texto.style?.letterSpacing, -0.3);
},
);
});
group('WU11 — estado estatico de subida de volumen (resolucion 4, sin '
'contador en vivo)', () {
testWidgets(