From e9fb1baa89dd5f3e112e90b64c7ee2cf63afbd89 Mon Sep 17 00:00:00 2001 From: Axel Niklasson Date: Tue, 15 Oct 2024 17:21:16 +0200 Subject: [PATCH 1/3] fix: use new domain for robin --- .../src/main/java/maestro/cli/view/TestSuiteStatusView.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 81511a6523..af0b6a474f 100644 --- a/maestro-cli/src/main/java/maestro/cli/view/TestSuiteStatusView.kt +++ b/maestro-cli/src/main/java/maestro/cli/view/TestSuiteStatusView.kt @@ -131,7 +131,7 @@ object TestSuiteStatusView { return if (domain.contains("localhost")) { "http://localhost:3000/project/$projectId/maestro-tests/app/$appId" } else { - "https://copilot.mobile.dev/project/$projectId/maestro-tests/app/$appId" + "https://app.robintest.com/project/$projectId/maestro-tests/app/$appId" } } From b82a62305defe81fc267aab228f4686c5614c6f8 Mon Sep 17 00:00:00 2001 From: Axel Niklasson Date: Tue, 15 Oct 2024 17:38:40 +0200 Subject: [PATCH 2/3] fix url --- .../src/main/java/maestro/cli/cloud/CloudInteractor.kt | 3 ++- .../src/main/java/maestro/cli/view/TestSuiteStatusView.kt | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/maestro-cli/src/main/java/maestro/cli/cloud/CloudInteractor.kt b/maestro-cli/src/main/java/maestro/cli/cloud/CloudInteractor.kt index f0e3c691f4..b3a5d4f64c 100644 --- a/maestro-cli/src/main/java/maestro/cli/cloud/CloudInteractor.kt +++ b/maestro-cli/src/main/java/maestro/cli/cloud/CloudInteractor.kt @@ -23,6 +23,7 @@ import maestro.cli.util.WorkspaceUtils import maestro.cli.view.ProgressBar import maestro.cli.view.TestSuiteStatusView import maestro.cli.view.TestSuiteStatusView.TestSuiteViewModel.Companion.toViewModel +import maestro.cli.view.TestSuiteStatusView.robinUploadUrl import maestro.cli.view.TestSuiteStatusView.uploadUrl import maestro.cli.view.box import maestro.utils.TemporaryDirectory @@ -135,7 +136,7 @@ class CloudInteractor( println() val project = requireNotNull(projectId) val appId = response.appId - val uploadUrl = uploadUrl(project, appId, client.domain) + val uploadUrl = robinUploadUrl(project, appId, response.uploadId, client.domain) val deviceMessage = if (response.deviceConfiguration != null) printDeviceInfo(response.deviceConfiguration) else "" val appBinaryIdResponseId = if (appBinaryId != null) response.appBinaryId else null return printMaestroCloudResponse( 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 af0b6a474f..b3e7c48fd9 100644 --- a/maestro-cli/src/main/java/maestro/cli/view/TestSuiteStatusView.kt +++ b/maestro-cli/src/main/java/maestro/cli/view/TestSuiteStatusView.kt @@ -123,15 +123,16 @@ object TestSuiteStatusView { domain: String = "mobile.dev", ) = "https://console.$domain/uploads/$uploadId?teamId=$teamId&appId=$appId" - fun uploadUrl( + fun robinUploadUrl( projectId: String, appId: String, + uploadId: String, domain: String = "" ): String { return if (domain.contains("localhost")) { - "http://localhost:3000/project/$projectId/maestro-tests/app/$appId" + "http://localhost:3000/project/$projectId/maestro-test/app/$appId/upload/$uploadId" } else { - "https://app.robintest.com/project/$projectId/maestro-tests/app/$appId" + "https://app.robintest.com/project/$projectId/maestro-test/app/$appId/upload/$uploadId" } } From f35dae40fbd3469f9e3ec2aaed143083d7ac4ee6 Mon Sep 17 00:00:00 2001 From: Axel Niklasson Date: Tue, 15 Oct 2024 17:55:12 +0200 Subject: [PATCH 3/3] fix app binary id --- .../src/main/java/maestro/cli/cloud/CloudInteractor.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/maestro-cli/src/main/java/maestro/cli/cloud/CloudInteractor.kt b/maestro-cli/src/main/java/maestro/cli/cloud/CloudInteractor.kt index b3a5d4f64c..c96b3eeeaf 100644 --- a/maestro-cli/src/main/java/maestro/cli/cloud/CloudInteractor.kt +++ b/maestro-cli/src/main/java/maestro/cli/cloud/CloudInteractor.kt @@ -138,7 +138,6 @@ class CloudInteractor( val appId = response.appId val uploadUrl = robinUploadUrl(project, appId, response.uploadId, client.domain) val deviceMessage = if (response.deviceConfiguration != null) printDeviceInfo(response.deviceConfiguration) else "" - val appBinaryIdResponseId = if (appBinaryId != null) response.appBinaryId else null return printMaestroCloudResponse( async, authToken, @@ -149,7 +148,7 @@ class CloudInteractor( uploadUrl, deviceMessage, appId, - appBinaryIdResponseId, + response.appBinaryId, response.uploadId, projectId, ) @@ -253,7 +252,7 @@ class CloudInteractor( private fun printDeviceInfo(deviceConfiguration: DeviceConfiguration): String { val platform = Platform.fromString(deviceConfiguration.platform) - val line1 = "Maestro Cloud device specs:\n* ${deviceConfiguration.displayInfo} - ${deviceConfiguration.deviceLocale}" + val line1 = "Robin device specs:\n* ${deviceConfiguration.displayInfo} - ${deviceConfiguration.deviceLocale}" val line2 = "To change OS version use this option: ${if (platform == Platform.IOS) "--ios-version=" else "--android-api-level="}" val line3 = "To change device locale use this option: --device-locale="