// Smoke test for the guided-setup wizard: it mounts and renders its // first step (three choice dropdowns) without touching the CLI. The // `chain init` shell-out only happens on Next/Apply, so mounting is // side-effect-free and safe to assert in a widget test. import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:chain_studio/l10n/app_localizations.dart'; import 'package:chain_studio/widgets/guided_setup_dialog.dart'; void main() { testWidgets('guided setup wizard mounts and shows the first step', (tester) async { await tester.pumpWidget( MaterialApp( locale: const Locale('en'), localizationsDelegates: AppLocalizations.localizationsDelegates, supportedLocales: AppLocalizations.supportedLocales, home: const Scaffold(body: GuidedSetupDialog()), ), ); await tester.pump(); // Title from l10n + the three scenario/intent/target dropdowns. expect(find.text('Setup assistant'), findsWidgets); expect(find.byType(DropdownButton), findsNWidgets(3)); // The "Next" action is present (advances to the review/apply step). expect(find.widgetWithText(FilledButton, 'Next'), findsOneWidget); }); }