launch.dart 711 B

1234567891011121314151617181920212223
  1. import 'package:appflowy/generated/locale_keys.g.dart';
  2. import 'package:appflowy/workspace/presentation/home/home_stack.dart';
  3. import 'package:easy_localization/easy_localization.dart';
  4. import 'package:flutter_test/flutter_test.dart';
  5. import 'base.dart';
  6. extension AppFlowyLaunch on WidgetTester {
  7. Future<void> tapGoButton() async {
  8. await tapButtonWithName(LocaleKeys.letsGoButtonText.tr());
  9. return;
  10. }
  11. Future<void> tapCreateButton() async {
  12. await tapButtonWithName(LocaleKeys.settings_files_create.tr());
  13. return;
  14. }
  15. Future<void> expectToSeeWelcomePage() async {
  16. expect(find.byType(HomeStack), findsOneWidget);
  17. expect(find.textContaining('Read me'), findsNWidgets(2));
  18. }
  19. }