test(setup): pin the English wizard variant
Some checks failed
Security / Security check (push) Failing after 2s
Some checks failed
Security / Security check (push) Failing after 2s
The wizard's widget tests all ran in German, leaving the English variant unverified (open follow-up from the setup redesign). One EN walk now pins the localized step counter, scenario cards with explanations, environment step and Next/Back navigation, and asserts no German strings leak through. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
c3c17d5d48
commit
2a1cbc82c3
1 changed files with 50 additions and 0 deletions
|
|
@ -415,6 +415,56 @@ void main() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
group('English variant', () {
|
||||||
|
Widget hostEn() => MaterialApp(
|
||||||
|
locale: const Locale('en'),
|
||||||
|
localizationsDelegates: AppLocalizations.localizationsDelegates,
|
||||||
|
supportedLocales: AppLocalizations.supportedLocales,
|
||||||
|
home: Builder(
|
||||||
|
builder: (context) => Scaffold(
|
||||||
|
body: Center(
|
||||||
|
child: ElevatedButton(
|
||||||
|
onPressed: () => GuidedSetupDialog.show(context),
|
||||||
|
child: const Text('open'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
|
||||||
|
testWidgets('walks the three steps with localized cards, no German leaks', (
|
||||||
|
tester,
|
||||||
|
) async {
|
||||||
|
await tester.pumpWidget(hostEn());
|
||||||
|
await tester.tap(find.text('open'));
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
|
// Step 1: English counter + scenario cards with explanations.
|
||||||
|
expect(find.text('Step 1 of 3'), findsOneWidget);
|
||||||
|
expect(find.text('Regulated production'), findsOneWidget);
|
||||||
|
expect(find.text('Just trying it out'), findsOneWidget);
|
||||||
|
expect(
|
||||||
|
find.textContaining('human approval before every AI step'),
|
||||||
|
findsOneWidget,
|
||||||
|
);
|
||||||
|
// Nothing renders in the other locale.
|
||||||
|
expect(find.text('Schritt 1 von 3'), findsNothing);
|
||||||
|
expect(find.text('Regulierter Produktivbetrieb'), findsNothing);
|
||||||
|
|
||||||
|
// Steps 2 and 3 walk with the English buttons.
|
||||||
|
await tester.tap(find.text('Next'));
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
expect(find.text('Step 2 of 3'), findsOneWidget);
|
||||||
|
await tester.tap(find.text('Next'));
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
expect(find.text('Step 3 of 3'), findsOneWidget);
|
||||||
|
expect(find.text('This computer'), findsOneWidget);
|
||||||
|
await tester.tap(find.text('Back'));
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
expect(find.text('Step 2 of 3'), findsOneWidget);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
group('parseSetupSuggestion', () {
|
group('parseSetupSuggestion', () {
|
||||||
test('accepts a valid JSON object embedded in prose', () {
|
test('accepts a valid JSON object embedded in prose', () {
|
||||||
final r = parseSetupSuggestion(
|
final r = parseSetupSuggestion(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue