fix(grabaciones): wire the recordings library into Settings navigation
WU15 shipped PantallaGrabaciones (the recordings library: storage bar, recording rows, the "..." Rename/Share/Delete menu) fully tested but reachable from nowhere in the app - a gap flagged in WU15's own apply-progress notes, not fixed there since it needed a design decision rather than a guess. Coordinator ruling applied: the approved mockup's "Ajustes > Grabaciones" screen depicts the library, not the folder/size settings form. So the GRABACIONES Y MUSICA group's "Grabaciones" row in pantalla_ajustes.dart now opens PantallaGrabaciones instead of PantallaAjustesGrabaciones. The settings form is not dropped - it stays reachable, now from within the library via a settings icon in its PluriPushScaffold actions, matching the existing pantalla_ajustes_timer_sueno.dart "Add" action precedent for a real capability living in the header. One new ARB key (en/es only, per precedent): recordingsLibrarySettingsTooltip. Tests: 604 -> 605 (one scenario re-targeted in pantalla_ajustes_test.dart, one new scenario in pantalla_grabaciones_test.dart, which needed the same ListTile-ink-assertion suppression helper WU3a/WU3b established since it now pushes a ListTile-bearing settings screen). flutter analyze unchanged at 1 pre-existing info. Recorded in tasks.md as WU15b - not part of the original 18-unit plan, added here to close the gap WU15 flagged.
This commit is contained in:
@@ -246,23 +246,30 @@ void main() {
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets('tapping the Grabaciones row pushes its detail screen', (
|
||||
tester,
|
||||
) async {
|
||||
setLargeSurface(tester);
|
||||
_suppressListTileInkAssertion();
|
||||
final estado = await crearEstado();
|
||||
addTearDown(estado.dispose);
|
||||
testWidgets(
|
||||
'tapping the Grabaciones row pushes the recordings LIBRARY, not the '
|
||||
'folder/size settings form (WU15b — the approved mockup screen '
|
||||
'"Ajustes > Grabaciones" depicts the library)',
|
||||
(tester) async {
|
||||
setLargeSurface(tester);
|
||||
_suppressListTileInkAssertion();
|
||||
final estado = await crearEstado();
|
||||
addTearDown(estado.dispose);
|
||||
|
||||
await tester.pumpWidget(buildAjustes(estado));
|
||||
await pumpStable(tester);
|
||||
await tester.pumpWidget(buildAjustes(estado));
|
||||
await pumpStable(tester);
|
||||
|
||||
await tester.tap(find.text('Recordings'));
|
||||
await pumpStable(tester);
|
||||
await tester.tap(find.text('Recordings'));
|
||||
await pumpStable(tester);
|
||||
|
||||
expect(find.byType(PluriPushScaffold), findsOneWidget);
|
||||
expect(find.text('Change path'), findsOneWidget);
|
||||
});
|
||||
expect(find.byType(PluriPushScaffold), findsOneWidget);
|
||||
expect(find.text('My recordings'), findsOneWidget);
|
||||
// The folder/size settings form is reachable FROM the library now,
|
||||
// not directly from the Settings root row — see
|
||||
// pantalla_grabaciones_test.dart for that entry point.
|
||||
expect(find.text('Change path'), findsNothing);
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets('tapping the Info row pushes its detail screen', (
|
||||
tester,
|
||||
|
||||
@@ -24,6 +24,26 @@ import 'package:shared_preferences/shared_preferences.dart';
|
||||
/// the real `share_plus` call, since this suite does not mock that channel
|
||||
/// either (see `pantalla_ajustes_backup_test.dart`'s note on the same
|
||||
/// constraint).
|
||||
///
|
||||
/// Pre-existing project constraint (see `pantalla_ajustes_test.dart`):
|
||||
/// PluriGlassSurface paints a background over ListTile's ink layer, which
|
||||
/// Flutter flags as a warning-level assertion, not a correctness bug. Only
|
||||
/// needed by the WU15b settings-affordance test below, which pushes
|
||||
/// PantallaAjustesGrabaciones (a ListTile-with-onTap screen) — this file's
|
||||
/// other scenarios never mount that screen.
|
||||
void _suppressListTileInkAssertion() {
|
||||
final original = FlutterError.onError;
|
||||
FlutterError.onError = (details) {
|
||||
if (details.exceptionAsString().contains(
|
||||
'ListTile background color or ink splashes may be invisible',
|
||||
)) {
|
||||
return;
|
||||
}
|
||||
original?.call(details);
|
||||
};
|
||||
addTearDown(() => FlutterError.onError = original);
|
||||
}
|
||||
|
||||
void main() {
|
||||
setUp(() {
|
||||
SharedPreferences.setMockInitialValues({});
|
||||
@@ -95,6 +115,36 @@ void main() {
|
||||
expect(find.text('My recordings'), findsOneWidget);
|
||||
});
|
||||
|
||||
testWidgets(
|
||||
'WU15b: tapping the settings icon pushes the folder/size settings '
|
||||
'screen (PantallaAjustesGrabaciones stays reachable, now from within '
|
||||
'the library instead of directly from the Settings root row)',
|
||||
(tester) async {
|
||||
_suppressListTileInkAssertion();
|
||||
final estado = EstadoGrabacion(
|
||||
servicio: _FakeServicioGrabacionConArchivos(
|
||||
const [],
|
||||
maxBytesFijo: 200 * 1024 * 1024,
|
||||
),
|
||||
);
|
||||
addTearDown(estado.dispose);
|
||||
|
||||
await tester.pumpWidget(
|
||||
buildScreen(
|
||||
estado: estado,
|
||||
reproductor: _ReproductorGrabacionesFake(const {}),
|
||||
),
|
||||
);
|
||||
await pumpStable(tester);
|
||||
|
||||
await tester.tap(find.byIcon(Icons.settings_outlined));
|
||||
await pumpStable(tester);
|
||||
|
||||
expect(find.byType(PluriPushScaffold), findsNWidgets(2));
|
||||
expect(find.text('Change path'), findsOneWidget);
|
||||
},
|
||||
);
|
||||
|
||||
testWidgets('15.1: storage bar reflects 84 of 200 MB used', (tester) async {
|
||||
final estado = EstadoGrabacion(
|
||||
servicio: _FakeServicioGrabacionConArchivos([
|
||||
|
||||
Reference in New Issue
Block a user