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);