From f52e9963fc2b4e9b799bd9ede5d5163943f5190a Mon Sep 17 00:00:00 2001 From: Proksh Luthra <35415752+proksh@users.noreply.github.com> Date: Tue, 19 Nov 2024 12:30:29 +0530 Subject: [PATCH] fix: added installing and preparing status for uploads (#2145) --- maestro-cli/src/main/java/maestro/cli/api/ApiClient.kt | 2 ++ maestro-cli/src/main/java/maestro/cli/model/FlowStatus.kt | 6 +++++- .../src/main/java/maestro/cli/view/TestSuiteStatusView.kt | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/maestro-cli/src/main/java/maestro/cli/api/ApiClient.kt b/maestro-cli/src/main/java/maestro/cli/api/ApiClient.kt index 47c2cf9c5f..7a315dd8fc 100644 --- a/maestro-cli/src/main/java/maestro/cli/api/ApiClient.kt +++ b/maestro-cli/src/main/java/maestro/cli/api/ApiClient.kt @@ -526,6 +526,8 @@ data class UploadStatus( enum class Status { PENDING, + PREPARING, + INSTALLING, RUNNING, SUCCESS, ERROR, diff --git a/maestro-cli/src/main/java/maestro/cli/model/FlowStatus.kt b/maestro-cli/src/main/java/maestro/cli/model/FlowStatus.kt index b1ad10c243..9d433235fc 100644 --- a/maestro-cli/src/main/java/maestro/cli/model/FlowStatus.kt +++ b/maestro-cli/src/main/java/maestro/cli/model/FlowStatus.kt @@ -4,6 +4,8 @@ import maestro.cli.api.UploadStatus enum class FlowStatus { PENDING, + PREPARING, + INSTALLING, RUNNING, SUCCESS, ERROR, @@ -15,6 +17,8 @@ enum class FlowStatus { fun from(status: UploadStatus.Status) = when (status) { UploadStatus.Status.PENDING -> PENDING + UploadStatus.Status.PREPARING -> PREPARING + UploadStatus.Status.INSTALLING -> INSTALLING UploadStatus.Status.RUNNING -> RUNNING UploadStatus.Status.SUCCESS -> SUCCESS UploadStatus.Status.ERROR -> ERROR @@ -24,4 +28,4 @@ enum class FlowStatus { } } -} \ No newline at end of file +} diff --git a/maestro-cli/src/main/java/maestro/cli/view/TestSuiteStatusView.kt b/maestro-cli/src/main/java/maestro/cli/view/TestSuiteStatusView.kt index b3e7c48fd9..248915f96a 100644 --- a/maestro-cli/src/main/java/maestro/cli/view/TestSuiteStatusView.kt +++ b/maestro-cli/src/main/java/maestro/cli/view/TestSuiteStatusView.kt @@ -98,6 +98,8 @@ object TestSuiteStatusView { FlowStatus.PENDING -> "Pending" FlowStatus.RUNNING -> "Running" FlowStatus.STOPPED -> "Stopped" + FlowStatus.PREPARING -> "Preparing Device" + FlowStatus.INSTALLING -> "Installing App" FlowStatus.CANCELED -> when (cancellationReason) { UploadStatus.CancellationReason.TIMEOUT -> "Timeout" UploadStatus.CancellationReason.OVERLAPPING_BENCHMARK -> "Skipped"