part of 'app_test.dart'; class ModularizationTest { static Future containLicense() async { _setUpLogged(); testWidgets('Os modulos de licença está sendo processados?', (WidgetTester tester) async { await tester.pumpWidget(const App()); await tester.pumpAndSettle(); await Future.delayed(const Duration(seconds: 1)); await tester.pumpAndSettle(); final LicenseRepository licenseRepository = LicenseRepositoryImpl(); final List result = await licenseRepository.getLicense(); expect(result, isNotEmpty); await tester.pumpAndSettle(); final List entries = MenuEntry.entries; await tester.pumpAndSettle(); final List entriesKey = entries .where((entry) => entry.types.contains(MenuEntryType.Home)) .map((entry) => '{key: ${entry.key}}') .toList(); await tester.pumpAndSettle(); expect(result, containsAll(entriesKey)); await Future.delayed(const Duration(milliseconds: 500)); return; }); _tearDown(); } static Future switchLicense() async { _setUpLogged(); testWidgets('Licença está sendo atualizada?', (WidgetTester tester) async { await tester.pumpWidget(const App()); final Finder profile = find.byKey(const Key('AsyncLocalProfileComponentWidget_InkWell')); await tester.pumpAndSettle(); await tester.tap(profile); await tester.pumpAndSettle(); final Finder local = find.text('FRE ACCESS DEMO'); await tester.pumpAndSettle(); await tester.tap(local); await tester.pumpAndSettle(); await Future.delayed(const Duration(milliseconds: 500)); return; }); _tearDown(); } }