diff --git a/packages/patrol/CHANGELOG.md b/packages/patrol/CHANGELOG.md index ff58812ed..7d1452922 100644 --- a/packages/patrol/CHANGELOG.md +++ b/packages/patrol/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.13.0-dev.4 + +- Bump `patrol_finders` and `patrol_log` + ## 3.13.0-dev.3 - Fix macos functionality. (#2408) diff --git a/packages/patrol/pubspec.yaml b/packages/patrol/pubspec.yaml index d61e7d032..96c493ba1 100644 --- a/packages/patrol/pubspec.yaml +++ b/packages/patrol/pubspec.yaml @@ -2,7 +2,7 @@ name: patrol description: > Powerful Flutter-native UI testing framework overcoming limitations of existing Flutter testing tools. Ready for action! -version: 3.13.0-dev.3 +version: 3.13.0-dev.4 homepage: https://patrol.leancode.co repository: https://github.com/leancodepl/patrol/tree/master/packages/patrol issue_tracker: https://github.com/leancodepl/patrol/issues @@ -26,8 +26,8 @@ dependencies: http: '^1.1.0' json_annotation: ^4.8.1 meta: ^1.10.0 - patrol_finders: ^2.3.0 - patrol_log: ^0.0.1+2 + patrol_finders: ^2.4.0 + patrol_log: ^0.1.0 shelf: ^1.4.1 test_api: '^0.7.0' diff --git a/packages/patrol_cli/CHANGELOG.md b/packages/patrol_cli/CHANGELOG.md index cdd03c7a3..ed5df7e84 100644 --- a/packages/patrol_cli/CHANGELOG.md +++ b/packages/patrol_cli/CHANGELOG.md @@ -1,6 +1,10 @@ +## 3.4.0-dev.3 + +- Add flag `clear-test-steps`. (#2421) + ## 3.4.0-dev.2 -- Bump `patrol_log` version. +- Bump `patrol_log` version. (#2402) ## 3.4.0-dev.1 diff --git a/packages/patrol_cli/lib/src/android/android_test_backend.dart b/packages/patrol_cli/lib/src/android/android_test_backend.dart index f4761cda7..99b0992f7 100644 --- a/packages/patrol_cli/lib/src/android/android_test_backend.dart +++ b/packages/patrol_cli/lib/src/android/android_test_backend.dart @@ -192,6 +192,7 @@ class AndroidTestBackend { bool interruptible = false, required bool showFlutterLogs, required bool hideTestSteps, + required bool clearTestSteps, }) async { await _disposeScope.run((scope) async { // Read patrol logs from logcat @@ -220,6 +221,7 @@ class AndroidTestBackend { reportPath: reportPath, showFlutterLogs: showFlutterLogs, hideTestSteps: hideTestSteps, + clearTestSteps: clearTestSteps, ) ..listen() ..startTimer(); diff --git a/packages/patrol_cli/lib/src/base/constants.dart b/packages/patrol_cli/lib/src/base/constants.dart index 55afcfa68..03fd7460a 100644 --- a/packages/patrol_cli/lib/src/base/constants.dart +++ b/packages/patrol_cli/lib/src/base/constants.dart @@ -1,3 +1,3 @@ /// Version of Patrol CLI. Must be kept in sync with pubspec.yaml. /// If you update this, make sure that compatibility-table.mdx is updated (if needed) -const version = '3.4.0-dev.2'; +const version = '3.4.0-dev.3'; diff --git a/packages/patrol_cli/lib/src/commands/develop.dart b/packages/patrol_cli/lib/src/commands/develop.dart index 6accebf7c..7ee0be8f6 100644 --- a/packages/patrol_cli/lib/src/commands/develop.dart +++ b/packages/patrol_cli/lib/src/commands/develop.dart @@ -55,6 +55,7 @@ class DevelopCommand extends PatrolCommand { usesPortOptions(); usesTagsOption(); usesHideTestSteps(); + usesClearTestSteps(); usesUninstallOption(); @@ -247,6 +248,7 @@ class DevelopCommand extends PatrolCommand { openDevtools: boolArg('open-devtools'), showFlutterLogs: false, hideTestSteps: boolArg('hide-test-steps'), + clearTestSteps: boolArg('clear-test-steps'), ); return 0; // for now, all exit codes are 0 @@ -324,6 +326,7 @@ class DevelopCommand extends PatrolCommand { required bool openDevtools, required bool showFlutterLogs, required bool hideTestSteps, + required bool clearTestSteps, }) async { Future Function() action; Future Function()? finalizer; @@ -339,6 +342,7 @@ class DevelopCommand extends PatrolCommand { showFlutterLogs: showFlutterLogs, hideTestSteps: hideTestSteps, flavor: flutterOpts.flavor, + clearTestSteps: clearTestSteps, ); final package = android.packageName; if (package != null && uninstall) { @@ -356,6 +360,7 @@ class DevelopCommand extends PatrolCommand { interruptible: true, showFlutterLogs: showFlutterLogs, hideTestSteps: hideTestSteps, + clearTestSteps: clearTestSteps, ); final bundleId = iosOpts.bundleId; if (bundleId != null && uninstall) { diff --git a/packages/patrol_cli/lib/src/commands/test.dart b/packages/patrol_cli/lib/src/commands/test.dart index 78ea968fc..f56bae855 100644 --- a/packages/patrol_cli/lib/src/commands/test.dart +++ b/packages/patrol_cli/lib/src/commands/test.dart @@ -58,6 +58,7 @@ class TestCommand extends PatrolCommand { useCoverageOptions(); usesShowFlutterLogs(); usesHideTestSteps(); + usesClearTestSteps(); usesUninstallOption(); @@ -270,6 +271,7 @@ See https://github.com/leancodepl/patrol/issues/1316 to learn more. device: device, showFlutterLogs: boolArg('show-flutter-logs'), hideTestSteps: boolArg('hide-test-steps'), + clearTestSteps: boolArg('clear-test-steps'), ); return allPassed ? 0 : 1; @@ -346,6 +348,7 @@ See https://github.com/leancodepl/patrol/issues/1316 to learn more. required Device device, required bool showFlutterLogs, required bool hideTestSteps, + required bool clearTestSteps, }) async { Future Function() action; Future Function()? finalizer; @@ -358,6 +361,7 @@ See https://github.com/leancodepl/patrol/issues/1316 to learn more. showFlutterLogs: showFlutterLogs, hideTestSteps: hideTestSteps, flavor: flutterOpts.flavor, + clearTestSteps: clearTestSteps, ); final package = android.packageName; if (package != null && uninstall) { @@ -371,6 +375,7 @@ See https://github.com/leancodepl/patrol/issues/1316 to learn more. device, showFlutterLogs: showFlutterLogs, hideTestSteps: hideTestSteps, + clearTestSteps: clearTestSteps, ); final bundleId = ios.bundleId; if (bundleId != null && uninstall) { diff --git a/packages/patrol_cli/lib/src/ios/ios_test_backend.dart b/packages/patrol_cli/lib/src/ios/ios_test_backend.dart index e6ee8652e..5e4cd8d02 100644 --- a/packages/patrol_cli/lib/src/ios/ios_test_backend.dart +++ b/packages/patrol_cli/lib/src/ios/ios_test_backend.dart @@ -155,6 +155,7 @@ class IOSTestBackend { bool interruptible = false, required bool showFlutterLogs, required bool hideTestSteps, + required bool clearTestSteps, }) async { await _disposeScope.run((scope) async { // Read patrol logs from log stream @@ -178,6 +179,7 @@ class IOSTestBackend { reportPath: reportPath, showFlutterLogs: showFlutterLogs, hideTestSteps: hideTestSteps, + clearTestSteps: clearTestSteps, ) ..listen() ..startTimer(); diff --git a/packages/patrol_cli/lib/src/runner/patrol_command.dart b/packages/patrol_cli/lib/src/runner/patrol_command.dart index 23f3e1d40..f6c049acf 100644 --- a/packages/patrol_cli/lib/src/runner/patrol_command.dart +++ b/packages/patrol_cli/lib/src/runner/patrol_command.dart @@ -202,6 +202,14 @@ abstract class PatrolCommand extends Command { ); } + void usesClearTestSteps() { + argParser.addFlag( + 'clear-test-steps', + help: 'Clear test steps after the test finishes.', + defaultsTo: true, + ); + } + /// Gets the parsed command-line flag named [name] as a `bool`. /// /// If no flag named [name] was added to the `ArgParser`, an [ArgumentError] diff --git a/packages/patrol_cli/pubspec.yaml b/packages/patrol_cli/pubspec.yaml index b01533c16..565ac6bd8 100644 --- a/packages/patrol_cli/pubspec.yaml +++ b/packages/patrol_cli/pubspec.yaml @@ -1,7 +1,7 @@ name: patrol_cli description: > Command-line tool for Patrol, a powerful Flutter-native UI testing framework. -version: 3.4.0-dev.2 # Must be kept in sync with constants.dart +version: 3.4.0-dev.3 # Must be kept in sync with constants.dart homepage: https://patrol.leancode.co repository: https://github.com/leancodepl/patrol/tree/master/packages/patrol_cli issue_tracker: https://github.com/leancodepl/patrol/issues?q=is%3Aopen+is%3Aissue+label%3A%22package%3A+patrol_cli%22 @@ -30,7 +30,7 @@ dependencies: mason_logger: ^0.2.10 meta: ^1.10.0 path: ^1.8.3 - patrol_log: ^0.0.1+2 + patrol_log: ^0.1.0 platform: ^3.1.3 process: ^5.0.1 pub_updater: ^0.4.0