From ea975b3bcbacfe71af07487c51631067b717e48d Mon Sep 17 00:00:00 2001 From: flemming-it Date: Mon, 13 Jul 2026 11:43:56 +0200 Subject: [PATCH] test: GUIDE_SHOTS_LOCALE for the guide harness (EN-parity proof runs) The screenshot harness already had GUIDE_SHOTS_THEME; add a matching GUIDE_SHOTS_LOCALE=en so the English wizard/pages can be captured for parity checks. The CTA finder accepts both locales. Verified: EN run renders the fully-translated wizard with no leaked German and no layout breaks. Signed-off-by: flemming-it --- integration_test/guide_shots_test.dart | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/integration_test/guide_shots_test.dart b/integration_test/guide_shots_test.dart index 4d0ef7d..a53726e 100644 --- a/integration_test/guide_shots_test.dart +++ b/integration_test/guide_shots_test.dart @@ -79,6 +79,12 @@ ThemeModeValue get _theme => ? ThemeModeValue.light : ThemeModeValue.dark; +/// Guide images ship German; GUIDE_SHOTS_LOCALE=en exists for +/// English-parity proof runs. +Locale get _locale => Locale( + Platform.environment['GUIDE_SHOTS_LOCALE'] == 'en' ? 'en' : 'de', +); + /// Rasterize the app's RepaintBoundary into `/.png`. Future _shot(WidgetTester tester, String name) async { // Two extra frames so ripples/route transitions settle visually. @@ -188,7 +194,7 @@ void main() { key: _shotKey, child: StudioApp( initialThemeMode: _theme, - initialLocale: const Locale('de'), + initialLocale: _locale, ), ), ); @@ -237,7 +243,9 @@ void main() { // it requires switching to a second, isolated hub instance. shell.navigateTo('welcome'); await _pumpFrames(tester); - final cta = find.text('In 3 Fragen loslegen'); + final cta = find.textContaining( + _locale.languageCode == 'en' ? '3 questions' : '3 Fragen', + ); if (cta.evaluate().isNotEmpty) { await tester.tap(cta.first); await _pumpFrames(tester);