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.
This commit is contained in:
@@ -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<void>(
|
||||
builder:
|
||||
(_) => const PantallaTutorialAyuda(
|
||||
primerArranque: false,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
contentPadding: EdgeInsets.zero,
|
||||
|
||||
@@ -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<PantallaTutorialAyuda>(
|
||||
find.byType(PantallaTutorialAyuda),
|
||||
);
|
||||
expect(pantalla.primerArranque, isFalse);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user