-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0682c18
commit afeb849
Showing
6 changed files
with
76 additions
and
4 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
example/lib/widgets/utils/bottom/catalog/test/fab_widget.test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/// AUTOGENERATED FILE. | ||
/// | ||
/// Use this file for testing the widget FabWidgetPreview | ||
/// | ||
import 'package:catalog/catalog.dart'; | ||
|
||
import '../../fab_widget.dart'; | ||
import '../dummy/fab_widget.dummy.dart'; | ||
|
||
class FabWidgetTest { | ||
void main() { | ||
group( | ||
'FabWidget - Tests', | ||
() { | ||
testWidgets( | ||
'Lorem text not found', | ||
(tester) async { | ||
final dummy = FabWidgetDummy().dummies.first; | ||
|
||
final widget = FabWidget( | ||
incrementCounter: dummy.parameters['incrementCounter'], | ||
); | ||
|
||
await tester.test(widget); | ||
|
||
expect(find.text('lorem ipsu'), findsNothing); | ||
}, | ||
); | ||
|
||
testWidgets( | ||
'Other lorem text not found', | ||
(tester) async { | ||
final dummy = FabWidgetDummy().dummies.first; | ||
|
||
final widget = FabWidget( | ||
incrementCounter: dummy.parameters['incrementCounter'], | ||
); | ||
|
||
await tester.test(widget); | ||
|
||
expect(find.text('lorem ipsu'), findsNothing); | ||
}, | ||
); | ||
}, | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import 'package:example/widgets/utils/bottom/catalog/test/fab_widget.test.dart'; | ||
|
||
void main() { | ||
FabWidgetTest().main(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:stringcare/stringcare.dart'; | ||
|
||
extension WidgetTestExt on WidgetTester { | ||
Future<void> test(Widget widget) async { | ||
await pumpWidget( | ||
MaterialApp( | ||
navigatorKey: Stringcare().navigatorKey, | ||
supportedLocales: Stringcare().locales, | ||
localizationsDelegates: Stringcare().delegates, | ||
home: widget, | ||
), | ||
); | ||
await pumpAndSettle(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters