test(i18n): cover the i18n facade, selector, manifest routing + locale (T-462)
Tests for the epic's new code so the 95% floor holds: ClideSettings.i18n string/interpolated null-safe + localizedCommandTitle; settings-renderer localization (section/field/help/select/file, project-scope tag, didUpdateWidget); extension-activation rollback + settings-contribution unregister; the Dutch gate check; RootShell applying app.locale on boot; and prompt/conversation tool-body + file-ref coverage. Also harden the menu toggle re-tap (capture the button point while stable, then tapAt) so it no longer throws getCenter under the serial coverage load. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -453,4 +453,21 @@ void main() {
|
||||
await tester.pump();
|
||||
expect(f.services.project.isOpen, isFalse);
|
||||
});
|
||||
|
||||
testWidgets('RootShell applies the persisted app.locale on boot (T-462)', (tester) async {
|
||||
await tester.runAsync(() async => f.services.settings.set('app.locale', 'nl_NL'));
|
||||
await pumpApp(tester);
|
||||
expect(tester.takeException(), isNull);
|
||||
// RootShell.initState parsed app.locale and called i18n.setLocale.
|
||||
expect(f.services.i18n.currentLocale, const Locale('nl', 'NL'));
|
||||
});
|
||||
|
||||
testWidgets('RootShell applies a bare language-only app.locale on boot (T-462)', (tester) async {
|
||||
// A single-part locale ('nl', no region) exercises the Locale(parts[0])
|
||||
// branch in _applyLocale, distinct from the language_REGION form above.
|
||||
await tester.runAsync(() async => f.services.settings.set('app.locale', 'nl'));
|
||||
await pumpApp(tester);
|
||||
expect(tester.takeException(), isNull);
|
||||
expect(f.services.i18n.currentLocale, const Locale('nl'));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user