fix(ajustes): group eyebrow outside the card, per-row accent icons
Audit 10.2 (t4:511): GrupoAjustes's eyebrow now sits OUTSIDE the PluriGlassSurface, at title-tier (20px) padding -- it used to share the card's own 16px content padding. Audit 10.5 (t4:514/526): FilaAjuste gains an optional iconColor. Wired on the two rows the prototype actually accents: AUDIO's Ecualizador (brand cyan) and STATIONS' Grupos de favoritos (warmCoral). Item 10.10 (two extra AUDIO rows -- "Calidad de streaming" and "Reproduccion sin interrupciones") is NOT implemented: neither concept has any backing state or service anywhere in this app today. Building them for real means inventing two new persisted settings, and a genuine streaming-quality preference would plausibly need to touch the protected servicio_audio.dart to actually affect playback -- out of scope for a visual-fidelity pass. Decorative rows that open nothing would be dead UI, which is worse than leaving the gap disclosed.
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:pluriwave/pantallas/ajustes/widgets/fila_ajuste.dart';
|
||||
import 'package:pluriwave/tema/pluriwave_theme.dart';
|
||||
import 'package:pluriwave/widgets/pluri_glass_surface.dart';
|
||||
|
||||
/// S8 (Tier 1 visual fidelity): the prototype puts a trailing "current
|
||||
/// value" on nearly every settings row, 13px `rgba(242,247,250,.55)` (t4
|
||||
@@ -122,4 +123,81 @@ void main() {
|
||||
expect(divider.indent, 47);
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets('visual fidelity (audit 10.5): an explicit iconColor tints the '
|
||||
'leading icon (t4 lines 514/516/522 -- equalizer/hd/folder accents)', (
|
||||
tester,
|
||||
) async {
|
||||
await tester.pumpWidget(
|
||||
host(
|
||||
FilaAjuste(
|
||||
icon: Icons.equalizer_rounded,
|
||||
titulo: 'Ecualizador base',
|
||||
iconColor: const Color(0xFF21D4D9),
|
||||
onTap: () {},
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final icon = tester.widget<Icon>(find.byIcon(Icons.equalizer_rounded));
|
||||
expect(icon.color, const Color(0xFF21D4D9));
|
||||
});
|
||||
|
||||
testWidgets(
|
||||
'visual fidelity (audit 10.5): omitting iconColor keeps the default '
|
||||
'(unchanged pre-10.5 behaviour)',
|
||||
(tester) async {
|
||||
await tester.pumpWidget(
|
||||
host(
|
||||
FilaAjuste(
|
||||
icon: Icons.language_rounded,
|
||||
titulo: 'Idioma',
|
||||
onTap: () {},
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final icon = tester.widget<Icon>(find.byIcon(Icons.language_rounded));
|
||||
expect(icon.color, isNull);
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets(
|
||||
'visual fidelity (audit 10.2): the group eyebrow sits OUTSIDE the '
|
||||
'card, at title-tier (20px) padding -- not inside the '
|
||||
'PluriGlassSurface (t4 line 511)',
|
||||
(tester) async {
|
||||
_suppressListTileInkAssertion();
|
||||
await tester.pumpWidget(
|
||||
host(
|
||||
GrupoAjustes(
|
||||
titulo: 'AUDIO',
|
||||
filas: [
|
||||
FilaAjuste(
|
||||
icon: Icons.equalizer_rounded,
|
||||
titulo: 'Uno',
|
||||
onTap: () {},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
expect(
|
||||
find.ancestor(
|
||||
of: find.text('AUDIO'),
|
||||
matching: find.byType(PluriGlassSurface),
|
||||
),
|
||||
findsNothing,
|
||||
reason: 'the eyebrow must not be a descendant of the card',
|
||||
);
|
||||
|
||||
final eyebrowLeft = tester.getTopLeft(find.text('AUDIO')).dx;
|
||||
expect(
|
||||
eyebrowLeft,
|
||||
20,
|
||||
reason: 'S5 title tier -- PluriLayout.titleHorizontal',
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user