diff --git a/integration_test/auth_test.dart b/integration_test/auth_test.dart index 7dc87264..0cd24882 100644 --- a/integration_test/auth_test.dart +++ b/integration_test/auth_test.dart @@ -43,7 +43,7 @@ class AuthenticationTest { final credentials = fuzzer.fuzz(concat); - await _unlogged($); + await _unlogged(); await $.pumpWidgetAndSettle(const App()); await _navigateToSignIn($); @@ -72,7 +72,7 @@ class AuthenticationTest { 'passwordTextFormField': '12345678', }; - await _unlogged($); + await _unlogged(); await $.pumpWidgetAndSettle(const App()); await _navigateToSignIn($); await _auth(credentials, $, throwsException); @@ -94,7 +94,7 @@ class AuthenticationTest { 'emailTextFormField': 'email_app@exemplo.com', 'passwordTextFormField': '12345678', }; - await _unlogged($); + await _unlogged(); await $.pumpWidgetAndSettle(const App()); await _navigateToSignUp($); await _auth(credentials, $, throwsException); @@ -151,7 +151,7 @@ class AuthenticationTest { final credentials = fuzzer.fuzz(concat); - await _unlogged($); + await _unlogged(); await $.pumpWidgetAndSettle(const App()); @@ -177,7 +177,7 @@ class AuthenticationTest { $.tester.printToConsole( 'Authentication Test - Sign-Out: Deslogar da Conta'); - await _loggedWithMultiLocalsAccount($); + await _loggedWithMultiLocalsAccount(); await $.pumpWidget(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -195,27 +195,7 @@ class AuthenticationTest { ); } - static void recovery() async { - // patrolWidgetTest('Open url in the app', ($) async { - // await _loggedWithMultiLocalsAccount($); - // await $.pumpWidget(const App()); - - // await $.waitUntilVisible($(MenuStaggeredView)); - - // // await $.native.pressHome(); - // // final String browserId = 'com.android.chrome'; - // // await $.native.openApp(appId: browserId); - // await $.native.openUrl(// - // 'https://freaccess.com.br/freaccess/alterarSenha.php?email=freaccesshub@gmail.com&token=67939240e12c31.10412525'); - - // await $.pumpAndSettle(); - // Future.delayed(Duration(seconds: 3)); - // await $.pump(Duration(seconds: 3)); - // await $.pumpAndSettle(); - // final PatrolFinder forgotPassword = await $(#ForgotPasswordScreen).waitUntilVisible(); - // expect(forgotPassword, findsOneWidget); - // }); - } + static void recovery() async {} } Future _auth( diff --git a/integration_test/locals_test.dart b/integration_test/locals_test.dart index 1fe1a6cb..e2e605c9 100644 --- a/integration_test/locals_test.dart +++ b/integration_test/locals_test.dart @@ -52,7 +52,7 @@ class LocalsTest { $ = tester; $.tester.printToConsole('Locals Test - Selecionar um local disponível'); - await _loggedWithSomeoneLocalAccount($, false); + await _loggedWithSomeoneLocalAccount(false); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); await $.waitUntilVisible($(LocalProfileComponentWidget)); @@ -191,7 +191,7 @@ class LocalsTest { $.tester.printToConsole( 'Locals Test - Desvincular do local selecionado com multiplos locais disponiveis'); - await _loggedWithSomeoneLocalAccount($); + await _loggedWithSomeoneLocalAccount(); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -253,7 +253,7 @@ class LocalsTest { $ = tester; $.tester.printToConsole('Locals Test - Vincular um local desvinculado'); - await _loggedWithSomeoneLocalAccount($, false); + await _loggedWithSomeoneLocalAccount(false); await $.pumpWidget(const App()); final PatrolFinder bottomSheetFinder = @@ -306,7 +306,7 @@ class LocalsTest { 'Selecionar um local disponível com multíplos locais disponíveis', // (PatrolTester tester) async { $ = tester; - await _loggedWithMultiLocalsAccount($); + await _loggedWithMultiLocalsAccount(); await $.pumpWidget(const App()); late Map credentials; final PatrolFinder throwsException = $(''); @@ -341,7 +341,7 @@ class LocalsTest { 'Selecionar um local disponível com somente um local disponível', // (PatrolTester tester) async { $ = tester; - await _loggedWithSomeoneLocalAccount($); + await _loggedWithSomeoneLocalAccount(); await $.pumpWidget(const App()); late Map credentials; final PatrolFinder throwsException = $(''); diff --git a/integration_test/menu_test.dart b/integration_test/menu_test.dart index 092ca63c..10b0ab62 100644 --- a/integration_test/menu_test.dart +++ b/integration_test/menu_test.dart @@ -10,7 +10,7 @@ class MenuTest { $.tester.printToConsole( 'Menu Test - As labels dos menuItems correspondem aos títulos das AppBars?'); - await _loggedWithMultiLocalsAccount($); + await _loggedWithMultiLocalsAccount(); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -102,7 +102,7 @@ class MenuTest { $ = tester; $.tester.printToConsole('Menu Test - HomeMenu contém seus itens?'); - await _loggedWithMultiLocalsAccount($); + await _loggedWithMultiLocalsAccount(); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -141,7 +141,7 @@ class MenuTest { $ = tester; $.tester.printToConsole('Menu Test - HomeMenu contém seus itens?'); - await _loggedWithSomeoneLocalAccount($); + await _loggedWithSomeoneLocalAccount(); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -181,7 +181,7 @@ class MenuTest { $ = tester; $.tester.printToConsole('Menu Test - DrawerMenu contém seus itens?'); - await _loggedWithMultiLocalsAccount($); + await _loggedWithMultiLocalsAccount(); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -228,7 +228,7 @@ class MenuTest { $ = tester; $.tester.printToConsole('Menu Test - DrawerMenu contém seus itens?'); - await _loggedWithSomeoneLocalAccount($); + await _loggedWithSomeoneLocalAccount(); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -278,7 +278,7 @@ class MenuTest { $ = tester; $.tester.printToConsole('Menu Test - Navegação entre items do Menu'); - await _loggedWithMultiLocalsAccount($); + await _loggedWithMultiLocalsAccount(); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); diff --git a/integration_test/module_test.dart b/integration_test/module_test.dart index 3138f8e0..6377e474 100644 --- a/integration_test/module_test.dart +++ b/integration_test/module_test.dart @@ -9,7 +9,7 @@ class ModularizationTest { $.tester.printToConsole( 'Modularization Test - Os modulos de licença está sendo processados?'); - await _loggedWithMultiLocalsAccount($); + await _loggedWithMultiLocalsAccount(); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -35,7 +35,7 @@ class ModularizationTest { $.tester.printToConsole( 'Modularization Test - Os modulos de licença está sendo processados?'); - await _loggedWithSomeoneLocalAccount($); + await _loggedWithSomeoneLocalAccount(); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); @@ -63,7 +63,7 @@ class ModularizationTest { $ = tester; $.tester.printToConsole('Licença está sendo atualizada?'); - await _loggedWithMultiLocalsAccount($); + await _loggedWithMultiLocalsAccount(); await $.pumpWidgetAndSettle(const App()); await $.waitUntilVisible($(MenuStaggeredView)); diff --git a/integration_test/utils_test.dart b/integration_test/utils_test.dart index 77eeb957..17c49545 100644 --- a/integration_test/utils_test.dart +++ b/integration_test/utils_test.dart @@ -1,8 +1,8 @@ part of 'app_test.dart'; -Future _loggedWithMultiLocalsAccount(PatrolTester $, +Future _loggedWithMultiLocalsAccount( [bool forceLinkedLocal = true]) async { - await _init($); + await _init(); await StorageHelper() // .set(SecureStorageKey.isLogged.value, 'true'); await StorageHelper() // @@ -29,9 +29,9 @@ Future _loggedWithMultiLocalsAccount(PatrolTester $, } } -Future _loggedWithSomeoneLocalAccount(PatrolTester $, +Future _loggedWithSomeoneLocalAccount( [bool forceLinkedLocal = true]) async { - await _init($); + await _init(); await StorageHelper() // .set(SecureStorageKey.isLogged.value, 'true'); await StorageHelper() // @@ -58,8 +58,8 @@ Future _loggedWithSomeoneLocalAccount(PatrolTester $, } } -Future _unlogged(PatrolTester $) async { - await _init($); +Future _unlogged() async { + await _init(); await StorageHelper() // .set(SecureStorageKey.isLogged.value, 'false'); await StorageHelper() // @@ -78,7 +78,7 @@ Future _unlogged(PatrolTester $) async { .set(LocalsStorageKey.isNewVersion.key, true); } -Future _init(PatrolTester $) async { +Future _init() async { WidgetsFlutterBinding.ensureInitialized(); await _initializeTracking(); await _initializeStorage(); diff --git a/integration_test/welcome_test.dart b/integration_test/welcome_test.dart index e5d1a3f2..e3dc0316 100644 --- a/integration_test/welcome_test.dart +++ b/integration_test/welcome_test.dart @@ -7,7 +7,7 @@ class WelcomeTest { (PatrolTester tester) async { $ = tester; $.tester.printToConsole('Welcome Test - Sign-In to Sign-Up'); - await _unlogged($); + await _unlogged(); await $.pumpWidgetAndSettle(const App()); await _navigateToSignIn($); @@ -22,7 +22,7 @@ class WelcomeTest { (PatrolTester tester) async { $ = tester; $.tester.printToConsole('Welcome Test - Sign-Up to Sign-In'); - await _unlogged($); + await _unlogged(); await $.pumpWidgetAndSettle(const App()); await _navigateToSignUp($); await _navigateToSignIn($);