test: GUIDE_SHOTS_LOCALE for the guide harness (EN-parity proof runs)
Some checks failed
Security / Security check (push) Failing after 1s
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:
parent
7888b71f63
commit
ea975b3bcb
1 changed files with 10 additions and 2 deletions
|
|
@ -79,6 +79,12 @@ ThemeModeValue get _theme =>
|
||||||
? ThemeModeValue.light
|
? ThemeModeValue.light
|
||||||
: ThemeModeValue.dark;
|
: 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`.
|
/// Rasterize the app's RepaintBoundary into `<outDir>/<name>.png`.
|
||||||
Future<void> _shot(WidgetTester tester, String name) async {
|
Future<void> _shot(WidgetTester tester, String name) async {
|
||||||
// Two extra frames so ripples/route transitions settle visually.
|
// Two extra frames so ripples/route transitions settle visually.
|
||||||
|
|
@ -188,7 +194,7 @@ void main() {
|
||||||
key: _shotKey,
|
key: _shotKey,
|
||||||
child: StudioApp(
|
child: StudioApp(
|
||||||
initialThemeMode: _theme,
|
initialThemeMode: _theme,
|
||||||
initialLocale: const Locale('de'),
|
initialLocale: _locale,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -237,7 +243,9 @@ void main() {
|
||||||
// it requires switching to a second, isolated hub instance.
|
// it requires switching to a second, isolated hub instance.
|
||||||
shell.navigateTo('welcome');
|
shell.navigateTo('welcome');
|
||||||
await _pumpFrames(tester);
|
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) {
|
if (cta.evaluate().isNotEmpty) {
|
||||||
await tester.tap(cta.first);
|
await tester.tap(cta.first);
|
||||||
await _pumpFrames(tester);
|
await _pumpFrames(tester);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue