From 66c83c6cb7a729fb08470fe457feb658a32e897e Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Tue, 14 Nov 2023 21:06:03 +0100 Subject: [PATCH] adapt code to new dependencies versions --- packages/patrol_cli/lib/src/base/logger.dart | 6 +++++- packages/patrol_cli/lib/src/commands/develop.dart | 4 ---- packages/patrol_cli/lib/src/commands/test.dart | 5 ----- packages/patrol_cli/lib/src/crossplatform/flutter_tool.dart | 2 -- packages/patrol_cli/test/ios/ios_test_backend_test.dart | 2 +- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/packages/patrol_cli/lib/src/base/logger.dart b/packages/patrol_cli/lib/src/base/logger.dart index fdda04f0b3..c1992b061b 100644 --- a/packages/patrol_cli/lib/src/base/logger.dart +++ b/packages/patrol_cli/lib/src/base/logger.dart @@ -57,7 +57,11 @@ class Logger extends mason_logger.Logger { } @override - void warn(String? message, {String tag = ''}) { + void warn( + String? message, { + String tag = 'WARN', + mason_logger.LogStyle? style, + }) { super.warn(message, tag: tag); } } diff --git a/packages/patrol_cli/lib/src/commands/develop.dart b/packages/patrol_cli/lib/src/commands/develop.dart index b3af87bc13..020810c255 100644 --- a/packages/patrol_cli/lib/src/commands/develop.dart +++ b/packages/patrol_cli/lib/src/commands/develop.dart @@ -200,7 +200,6 @@ class DevelopCommand extends PatrolCommand { switch (device.targetPlatform) { case TargetPlatform.android: buildAction = () => _androidTestBackend.build(androidOpts); - break; case TargetPlatform.iOS: buildAction = () => _iosTestBackend.build(iosOpts); } @@ -235,7 +234,6 @@ class DevelopCommand extends PatrolCommand { if (packageName != null) { action = () => _androidTestBackend.uninstall(packageName, device); } - break; case TargetPlatform.iOS: final bundleId = iosOpts.bundleId; if (bundleId != null) { @@ -245,7 +243,6 @@ class DevelopCommand extends PatrolCommand { device: device, ); } - break; } try { @@ -276,7 +273,6 @@ class DevelopCommand extends PatrolCommand { if (package != null && uninstall) { finalizer = () => _androidTestBackend.uninstall(package, device); } - break; case TargetPlatform.iOS: appId = iosOpts.bundleId; action = () async => diff --git a/packages/patrol_cli/lib/src/commands/test.dart b/packages/patrol_cli/lib/src/commands/test.dart index bfe02ccfe7..fad3f8019e 100644 --- a/packages/patrol_cli/lib/src/commands/test.dart +++ b/packages/patrol_cli/lib/src/commands/test.dart @@ -196,7 +196,6 @@ See https://github.com/leancodepl/patrol/issues/1316 to learn more. if (packageName != null) { action = () => _androidTestBackend.uninstall(packageName, device); } - break; case TargetPlatform.iOS: final bundleId = iosOpts.bundleId; if (bundleId != null) { @@ -206,7 +205,6 @@ See https://github.com/leancodepl/patrol/issues/1316 to learn more. device: device, ); } - break; } try { @@ -225,7 +223,6 @@ See https://github.com/leancodepl/patrol/issues/1316 to learn more. switch (device.targetPlatform) { case TargetPlatform.android: buildAction = () => _androidTestBackend.build(androidOpts); - break; case TargetPlatform.iOS: buildAction = () => _iosTestBackend.build(iosOpts); } @@ -258,7 +255,6 @@ See https://github.com/leancodepl/patrol/issues/1316 to learn more. if (package != null && uninstall) { finalizer = () => _androidTestBackend.uninstall(package, device); } - break; case TargetPlatform.iOS: action = () async => _iosTestBackend.execute(iosOpts, device); final bundleId = iosOpts.bundleId; @@ -269,7 +265,6 @@ See https://github.com/leancodepl/patrol/issues/1316 to learn more. device: device, ); } - break; } var allPassed = true; diff --git a/packages/patrol_cli/lib/src/crossplatform/flutter_tool.dart b/packages/patrol_cli/lib/src/crossplatform/flutter_tool.dart index f80a1cfb90..a2e1f810d0 100644 --- a/packages/patrol_cli/lib/src/crossplatform/flutter_tool.dart +++ b/packages/patrol_cli/lib/src/crossplatform/flutter_tool.dart @@ -213,10 +213,8 @@ class FlutterTool { switch (_platform.operatingSystem) { case Platform.macOS: process = await _processManager.start(['open', url]); - break; case Platform.windows: process = await _processManager.start(['start', url]); - break; case Platform.linux: process = await _processManager.start(['xdg-open', url]); } diff --git a/packages/patrol_cli/test/ios/ios_test_backend_test.dart b/packages/patrol_cli/test/ios/ios_test_backend_test.dart index 1bbbda6588..a6d951016d 100644 --- a/packages/patrol_cli/test/ios/ios_test_backend_test.dart +++ b/packages/patrol_cli/test/ios/ios_test_backend_test.dart @@ -217,5 +217,5 @@ class FakeProcessManager extends Fake implements ProcessManager {} class FakeLogger extends Fake implements Logger { @override - void detail(String? message) {} + void detail(String? message, {String? Function(String?)? style}) {} }