widget_test.dart 953 B

12345678910111213141516171819202122232425
  1. // This is a basic Flutter widget test.
  2. // To perform an interaction with a widget in your test, use the WidgetTester utility that Flutter
  3. // provides. For example, you can send tap and scroll gestures. You can also use WidgetTester to
  4. // find child widgets in the widget tree, read text, and verify that the values of widget properties
  5. // are correct.
  6. void main() {
  7. // testWidgets('Counter increments smoke test', (WidgetTester tester) async {
  8. // // Build our app and trigger a frame.
  9. // await tester.pumpWidget(new MyApp());
  10. //
  11. // // Verify that our counter starts at 0.
  12. // expect(find.text('0'), findsOneWidget);
  13. // expect(find.text('1'), findsNothing);
  14. //
  15. // // Tap the '+' icon and trigger a frame.
  16. // await tester.tap(find.byIcon(Icons.add));
  17. // await tester.pump();
  18. //
  19. // // Verify that our counter has incremented.
  20. // expect(find.text('0'), findsNothing);
  21. // expect(find.text('1'), findsOneWidget);
  22. // });
  23. }