fix(localization): fix tests

This commit is contained in:
Salvatore Giordano
2022-05-05 09:57:28 +02:00
parent 1362c30dd0
commit 4944516c13
@@ -173,8 +173,8 @@ void main() {
launchUrlError: "Impossible de lancer l'url",
),
const FooStreamChatLocalizationsDelegate(
supportedLanguage: 'de',
launchUrlError: 'Kann die URL nicht starten',
supportedLanguage: 'uz',
launchUrlError: 'test',
),
],
supportedLocales: const <Locale>[
@@ -182,6 +182,7 @@ void main() {
Locale('hi'),
Locale('fr'),
Locale('de'),
Locale('uz'),
],
buildContent: (BuildContext context) => Text(
StreamChatLocalizations.of(context)!.launchUrlError,
@@ -202,9 +203,9 @@ void main() {
await tester.pump();
expect(find.text("Impossible de lancer l'url"), findsOneWidget);
await tester.binding.setLocale('de', 'DE');
await tester.binding.setLocale('uz', 'UZ');
await tester.pump();
expect(find.text('Kann die URL nicht starten'), findsOneWidget);
expect(find.text('test'), findsOneWidget);
},
);