diff --git a/packages/patrol/example/integration_test/internal/callbacks_all_test.dart b/packages/patrol/example/integration_test/internal/callbacks_all_test.dart index f5b1fa5b36..b5b3654f28 100644 --- a/packages/patrol/example/integration_test/internal/callbacks_all_test.dart +++ b/packages/patrol/example/integration_test/internal/callbacks_all_test.dart @@ -1,7 +1,5 @@ import 'package:flutter/material.dart'; import 'package:patrol/src/extensions.dart'; -// ignore: implementation_imports -import 'package:patrol/src/logs.dart'; // ignore: depend_on_referenced_packages import 'package:test_api/src/backend/invoker.dart'; @@ -9,16 +7,18 @@ import '../common.dart'; String get currentTest => Invoker.current!.fullCurrentTestName(); +void _print(String text) => print('TEST_DEBUG: $text'); + void main() { group('parent', () { patrolSetUpAll(() async { await Future.delayed(Duration(seconds: 1)); - patrolDebug('ran setUpAll (1) before "$currentTest"'); + _print('ran patrolSetUpAll (1) before "$currentTest"'); }); patrolSetUpAll(() async { await Future.delayed(Duration(seconds: 1)); - patrolDebug('ran setUpAll (2) before "$currentTest"'); + _print('ran patrolSetUpAll (2) before "$currentTest"'); }); patrolTest('testA', nativeAutomation: true, _body); @@ -29,7 +29,7 @@ void main() { Future _body(PatrolTester $) async { final testName = Invoker.current!.fullCurrentTestName(); - patrolDebug('ran body of test "$testName"'); + _print('ran body of test "$testName"'); await createApp($); diff --git a/packages/patrol/example/integration_test/internal/callbacks_test.dart b/packages/patrol/example/integration_test/internal/callbacks_test.dart index 43959dbfeb..3b74372308 100644 --- a/packages/patrol/example/integration_test/internal/callbacks_test.dart +++ b/packages/patrol/example/integration_test/internal/callbacks_test.dart @@ -7,31 +7,33 @@ import '../common.dart'; String get currentTest => Invoker.current!.fullCurrentTestName(); -void _print(String text) => print('PATROL_DEBUG: $text'); +void _print(String text) => print('TEST_DEBUG: $text'); void main() { patrolSetUp(() async { await Future.delayed(Duration(seconds: 1)); - _print('setting up before $currentTest'); + _print('ran patrolSetUp (1) up before "$currentTest"'); }); patrolTearDown(() async { await Future.delayed(Duration(seconds: 1)); - _print('tearing down after $currentTest'); + _print('ran patrolTearDown (1) after "$currentTest"'); }); patrolTest('testFirst', nativeAutomation: true, _body); group('groupA', () { patrolSetUp(() async { - if (currentTest == 'callbacks_test groupA testB') { - throw Exception('PATROL_DEBUG: Crashing testB on purpose!'); + + if (currentTest == 'internal.callbacks_test groupA testB') { + throw Exception('TEST_DEBUG: "$currentTest" crashed on purpose'); } - _print('setting up before $currentTest'); + + _print('ran patrolSetUp (2) before "$currentTest"'); }); patrolTearDown(() async { - _print('tearing down after $currentTest'); + _print('ran patrolTearDown (2) after "$currentTest"'); }); patrolTest('testA', nativeAutomation: true, _body); @@ -44,7 +46,7 @@ void main() { Future _body(PatrolTester $) async { final testName = Invoker.current!.fullCurrentTestName(); - _print('test body: name=$testName'); + _print('ran body of test "$testName"'); await createApp($); diff --git a/packages/patrol/lib/src/native/contracts/contracts.dart b/packages/patrol/lib/src/native/contracts/contracts.dart index 3c90d4c5ef..233cf12e22 100644 --- a/packages/patrol/lib/src/native/contracts/contracts.dart +++ b/packages/patrol/lib/src/native/contracts/contracts.dart @@ -112,7 +112,7 @@ class ListDartLifecycleCallbacksResponse with EquatableMixin { }); factory ListDartLifecycleCallbacksResponse.fromJson( - Map json) => + Map json,) => _$ListDartLifecycleCallbacksResponseFromJson(json); final List setUpAlls; @@ -176,7 +176,7 @@ class SetLifecycleCallbacksStateRequest with EquatableMixin { }); factory SetLifecycleCallbacksStateRequest.fromJson( - Map json) => + Map json,) => _$SetLifecycleCallbacksStateRequestFromJson(json); final Map state; @@ -668,7 +668,7 @@ class MarkLifecycleCallbackExecutedRequest with EquatableMixin { }); factory MarkLifecycleCallbackExecutedRequest.fromJson( - Map json) => + Map json,) => _$MarkLifecycleCallbackExecutedRequestFromJson(json); final String name; diff --git a/packages/patrol/lib/src/native/contracts/patrol_app_service_server.dart b/packages/patrol/lib/src/native/contracts/patrol_app_service_server.dart index 95e5b08d44..30e0563960 100644 --- a/packages/patrol/lib/src/native/contracts/patrol_app_service_server.dart +++ b/packages/patrol/lib/src/native/contracts/patrol_app_service_server.dart @@ -27,7 +27,7 @@ abstract class PatrolAppServiceServer { final stringContent = await request.readAsString(utf8); final json = jsonDecode(stringContent); final requestObj = SetLifecycleCallbacksStateRequest.fromJson( - json as Map); + json as Map,); final result = await setLifecycleCallbacksState(requestObj); @@ -51,6 +51,6 @@ abstract class PatrolAppServiceServer { Future listDartTests(); Future listDartLifecycleCallbacks(); Future setLifecycleCallbacksState( - SetLifecycleCallbacksStateRequest request); + SetLifecycleCallbacksStateRequest request,); Future runDartTest(RunDartTestRequest request); } diff --git a/packages/patrol_cli/lib/src/test_runner.dart b/packages/patrol_cli/lib/src/test_runner.dart index cf96acd446..74e3df8d58 100644 --- a/packages/patrol_cli/lib/src/test_runner.dart +++ b/packages/patrol_cli/lib/src/test_runner.dart @@ -3,7 +3,7 @@ import 'package:equatable/equatable.dart'; import 'package:path/path.dart' show basename; import 'package:patrol_cli/src/devices.dart'; -// TODO(bartekpacia): Lots of this code is not needed after #1004 is done. +// TODO: Lots of this code is not needed after #1004 is done. enum TargetRunStatus { failedToBuild, failedToExecute, passed, canceled } diff --git a/schema.dart b/schema.dart index 23648608f5..68ff1d99c6 100644 --- a/schema.dart +++ b/schema.dart @@ -231,7 +231,7 @@ abstract class NativeAutomator { // other void debug(); -// TODO(bartekpacia): Move these RPCc into a new service (PatrolNativeTestService) because it doesn't fit here +// TODO: Move these RPCc into a new service (PatrolNativeTestService) because it doesn't fit here void markPatrolAppServiceReady(); void markLifecycleCallbackExecuted( MarkLifecycleCallbackExecutedRequest request);