widget_test.dart 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. // This is a basic Flutter widget test.
  2. //
  3. // To perform an interaction with a widget in your test, use the WidgetTester
  4. // utility that Flutter provides. For example, you can send tap and scroll
  5. // gestures. You can also use WidgetTester to find child widgets in the widget
  6. // tree, read text, and verify that the values of widget properties are correct.
  7. import 'package:flutter/material.dart';
  8. import 'package:flutter_test/flutter_test.dart';
  9. import 'package:flowy_infra_ui_example/main.dart';
  10. void main() {
  11. testWidgets('Verify Platform version', (WidgetTester tester) async {
  12. // Build our app and trigger a frame.
  13. await tester.pumpWidget(const ExampleApp());
  14. // Verify that platform version is retrieved.
  15. expect(
  16. find.byWidgetPredicate(
  17. <<<<<<< HEAD
  18. (Widget widget) =>
  19. widget is Text && widget.data!.startsWith('Running on:'),
  20. =======
  21. (Widget widget) => widget is Text && widget.data!.startsWith('Running on:'),
  22. >>>>>>> [infra_ui][keyboard] Bump infra_ui to 1.20.0 and fix compiling issues
  23. ),
  24. findsOneWidget,
  25. );
  26. });
  27. }