From cbceb8a7b896cb5ffe374667bfeca29f0d43cb0a Mon Sep 17 00:00:00 2001 From: Tarek Belkahia Date: Sun, 25 Aug 2024 16:47:44 +0100 Subject: [PATCH 1/2] Fix error message --- .../src/main/java/maestro/cli/command/TestCommand.kt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/maestro-cli/src/main/java/maestro/cli/command/TestCommand.kt b/maestro-cli/src/main/java/maestro/cli/command/TestCommand.kt index f1ad98dd18..4cfcca0636 100644 --- a/maestro-cli/src/main/java/maestro/cli/command/TestCommand.kt +++ b/maestro-cli/src/main/java/maestro/cli/command/TestCommand.kt @@ -264,14 +264,13 @@ class TestCommand : Callable { val maestro = session.maestro val device = session.device - if (flowFile.isDirectory || format != ReportFormat.NOOP) { + if (continuous && flowFile.isDirectory || format != ReportFormat.NOOP) { // Run multiple flows - if (continuous) { - throw CommandLine.ParameterException( - commandSpec.commandLine(), - "Continuous mode is not supported for directories. $flowFile is a directory", - ) + val error = + if (format != ReportFormat.NOOP) "Format can not be different from NOOP in continuous mode. Passed format is $format." + else "Continuous mode is not supported for directories. $flowFile is a directory" + throw CommandLine.ParameterException(commandSpec.commandLine(), error) } val suiteResult = TestSuiteInteractor( From 02b8f4c6e82306c623e77209e24afd2e02460423 Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Fri, 30 Aug 2024 01:42:33 +0200 Subject: [PATCH 2/2] fix logic bug --- maestro-cli/src/main/java/maestro/cli/command/TestCommand.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/maestro-cli/src/main/java/maestro/cli/command/TestCommand.kt b/maestro-cli/src/main/java/maestro/cli/command/TestCommand.kt index 4cfcca0636..c53a74b3ea 100644 --- a/maestro-cli/src/main/java/maestro/cli/command/TestCommand.kt +++ b/maestro-cli/src/main/java/maestro/cli/command/TestCommand.kt @@ -264,7 +264,7 @@ class TestCommand : Callable { val maestro = session.maestro val device = session.device - if (continuous && flowFile.isDirectory || format != ReportFormat.NOOP) { + if (flowFile.isDirectory || format != ReportFormat.NOOP) { // Run multiple flows if (continuous) { val error =