test: GUIDE_SHOTS_LOCALE for the guide harness (EN-parity proof runs)
Some checks failed
Security / Security check (push) Failing after 1s

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 <stefan.a.flemming@googlemail.com>
This commit is contained in:
flemming-it 2026-07-13 11:43:56 +02:00
parent 7888b71f63
commit ea975b3bcb

View file

@ -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 `<outDir>/<name>.png`.
Future<void> _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);