fix(localization): fix tests
This commit is contained in:
@@ -173,8 +173,8 @@ void main() {
|
|||||||
launchUrlError: "Impossible de lancer l'url",
|
launchUrlError: "Impossible de lancer l'url",
|
||||||
),
|
),
|
||||||
const FooStreamChatLocalizationsDelegate(
|
const FooStreamChatLocalizationsDelegate(
|
||||||
supportedLanguage: 'de',
|
supportedLanguage: 'uz',
|
||||||
launchUrlError: 'Kann die URL nicht starten',
|
launchUrlError: 'test',
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
supportedLocales: const <Locale>[
|
supportedLocales: const <Locale>[
|
||||||
@@ -182,6 +182,7 @@ void main() {
|
|||||||
Locale('hi'),
|
Locale('hi'),
|
||||||
Locale('fr'),
|
Locale('fr'),
|
||||||
Locale('de'),
|
Locale('de'),
|
||||||
|
Locale('uz'),
|
||||||
],
|
],
|
||||||
buildContent: (BuildContext context) => Text(
|
buildContent: (BuildContext context) => Text(
|
||||||
StreamChatLocalizations.of(context)!.launchUrlError,
|
StreamChatLocalizations.of(context)!.launchUrlError,
|
||||||
@@ -202,9 +203,9 @@ void main() {
|
|||||||
await tester.pump();
|
await tester.pump();
|
||||||
expect(find.text("Impossible de lancer l'url"), findsOneWidget);
|
expect(find.text("Impossible de lancer l'url"), findsOneWidget);
|
||||||
|
|
||||||
await tester.binding.setLocale('de', 'DE');
|
await tester.binding.setLocale('uz', 'UZ');
|
||||||
await tester.pump();
|
await tester.pump();
|
||||||
expect(find.text('Kann die URL nicht starten'), findsOneWidget);
|
expect(find.text('test'), findsOneWidget);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user