Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
ilteoood committed Jul 6, 2024
1 parent 828432a commit 0f608d0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions example/integration-test/basic_example_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ void main() {
launchApp(WidgetTester tester) async {
appmain.main();
await tester.pumpAndSettle();
await tester.tap(find.byKey(new Key('basicExample')));
await tester.tap(find.byKey(const Key('basicExample')));
await tester.pumpAndSettle();
}

testWidgets('File translation loader example 0 times',
(WidgetTester tester) async {
await launchApp(tester);
final incrementCounter = find.byKey(new Key('incrementCounter'));
final changeLanguage = find.byKey(new Key('changeLanguage'));
final incrementCounter = find.byKey(const Key('incrementCounter'));
final changeLanguage = find.byKey(const Key('changeLanguage'));
expect(find.text("Hiciste clic 0 veces!"), findsOneWidget);
expect(find.text("Hola Flutter lover!"), findsOneWidget);
expect(find.text("Hai premuto 0 volte!"), findsNothing);
Expand All @@ -37,7 +37,7 @@ void main() {
expect(find.text("Hiciste clic 2 veces!"), findsNothing);
expect(find.text("Hai premuto 2 volte!"), findsNothing);
await tester.tap(changeLanguage);
await tester.pumpAndSettle(Duration(milliseconds: 5000));
await tester.pumpAndSettle(const Duration(milliseconds: 5000));
expect(find.text("Ciao Flutter lover!"), findsOneWidget);
expect(find.text('Hai premuto un bottone!'), findsOneWidget);
expect(find.text("Hai premuto 2 volte!"), findsOneWidget);
Expand All @@ -52,7 +52,7 @@ void main() {
expect(find.text("Hiciste clic 5 veces!"), findsNothing);
expect(find.text("You clicked 5 times!"), findsNothing);
await tester.tap(changeLanguage);
await tester.pumpAndSettle(Duration(milliseconds: 5000));
await tester.pumpAndSettle(const Duration(milliseconds: 5000));
expect(find.text("Hello Flutter lover!"), findsOneWidget);
expect(find.text('You clicked on button!'), findsOneWidget);
expect(find.text("You clicked 5 times!"), findsOneWidget);
Expand Down
2 changes: 1 addition & 1 deletion example/integration-test/namespace_example_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ void main() {
launchApp(WidgetTester tester) async {
appmain.main();
await tester.pumpAndSettle();
await tester.tap(find.byKey(new Key('nameSpaceExample')));
await tester.tap(find.byKey(const Key('nameSpaceExample')));
await tester.pumpAndSettle();
}

Expand Down
4 changes: 2 additions & 2 deletions example/integration-test/network_example_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ void main() {
launchApp(WidgetTester tester) async {
appmain.main();
await tester.pumpAndSettle();
await tester.tap(find.byKey(new Key('networkExample')));
await tester.pumpAndSettle(Duration(milliseconds: 5000));
await tester.tap(find.byKey(const Key('networkExample')));
await tester.pumpAndSettle(const Duration(milliseconds: 5000));
}

testWidgets('Network translation loader example',
Expand Down
2 changes: 1 addition & 1 deletion example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: example
name: flutter_i18n_example
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
Expand Down

0 comments on commit 0f608d0

Please sign in to comment.