From a949b4503dd622d2e49b210930a72907d740c16d Mon Sep 17 00:00:00 2001 From: freetlab Date: Sat, 1 Aug 2026 11:49:11 +0200 Subject: [PATCH] feat(tutorial): repoint Ajustes "Ayuda y tutorial" to the carousel Point the existing Info tile at PantallaTutorialAyuda (with primerArranque: false, so its last page reads "Close") instead of PluriOnboardingDialog's "what's new" modal. Trade-off: PluriOnboardingDialog loses its only manual entry point -- it keeps auto-showing on its own existing cadence from app.dart, but is no longer reachable by tapping this tile. This matches the mockup's Info screen, which has no separate "what's new" row. --- .../ajustes/pantalla_ajustes_info.dart | 12 +++++++++-- .../ajustes/pantalla_ajustes_info_test.dart | 21 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/lib/pantallas/ajustes/pantalla_ajustes_info.dart b/lib/pantallas/ajustes/pantalla_ajustes_info.dart index 6447709..ac6f00f 100644 --- a/lib/pantallas/ajustes/pantalla_ajustes_info.dart +++ b/lib/pantallas/ajustes/pantalla_ajustes_info.dart @@ -7,8 +7,8 @@ import '../../l10n/gen/app_localizations.dart'; import '../../widgets/pluri_glass_surface.dart'; import '../../widgets/pluri_icon.dart'; import '../../widgets/pluri_layout.dart'; -import '../../widgets/pluri_onboarding_dialog.dart'; import '../../widgets/pluri_push_scaffold.dart'; +import '../pantalla_tutorial_ayuda.dart'; /// APLICACIÓN group · "Info" (design ADR-3). Body moved verbatim from the /// former `_SeccionInfo` in `pantalla_ajustes.dart`. Unlike the other four @@ -86,7 +86,15 @@ class _CuerpoInfo extends StatelessWidget { title: Text(AppLocalizations.of(ctx).helpTitle), subtitle: Text(AppLocalizations.of(ctx).helpSubtitle), trailing: const Icon(Icons.chevron_right_rounded), - onTap: () => PluriOnboardingDialog.mostrar(ctx), + onTap: + () => Navigator.of(ctx).push( + MaterialPageRoute( + builder: + (_) => const PantallaTutorialAyuda( + primerArranque: false, + ), + ), + ), ), ListTile( contentPadding: EdgeInsets.zero, diff --git a/test/pantallas/ajustes/pantalla_ajustes_info_test.dart b/test/pantallas/ajustes/pantalla_ajustes_info_test.dart index 93885fa..ecc9d90 100644 --- a/test/pantallas/ajustes/pantalla_ajustes_info_test.dart +++ b/test/pantallas/ajustes/pantalla_ajustes_info_test.dart @@ -5,6 +5,7 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:pluriwave/estado/estado_radio.dart'; import 'package:pluriwave/l10n/gen/app_localizations.dart'; import 'package:pluriwave/pantallas/ajustes/pantalla_ajustes_info.dart'; +import 'package:pluriwave/pantallas/pantalla_tutorial_ayuda.dart'; import 'package:pluriwave/widgets/pluri_push_scaffold.dart'; import 'package:provider/provider.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -98,4 +99,24 @@ void main() { expect(find.text('Help and tutorial'), findsOneWidget); }, ); + + testWidgets('tapping "Help and tutorial" opens the tutorial carousel with ' + 'primerArranque: false (so its last page reads "Close", not ' + '"Start listening")', (tester) async { + _suppressListTileInkAssertion(); + final estado = await crearEstado(); + addTearDown(estado.dispose); + + await tester.pumpWidget(buildScreen(estado)); + await tester.pump(); + await tester.pump(const Duration(milliseconds: 100)); + + await tester.tap(find.text('Help and tutorial')); + await tester.pumpAndSettle(); + + final pantalla = tester.widget( + find.byType(PantallaTutorialAyuda), + ); + expect(pantalla.primerArranque, isFalse); + }); }