Skip to content

Commit e957c5e

Browse files
fix: robin upload url / app binary id (#2094)
1 parent c024a8b commit e957c5e

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

maestro-cli/src/main/java/maestro/cli/cloud/CloudInteractor.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import maestro.cli.util.WorkspaceUtils
2323
import maestro.cli.view.ProgressBar
2424
import maestro.cli.view.TestSuiteStatusView
2525
import maestro.cli.view.TestSuiteStatusView.TestSuiteViewModel.Companion.toViewModel
26+
import maestro.cli.view.TestSuiteStatusView.robinUploadUrl
2627
import maestro.cli.view.TestSuiteStatusView.uploadUrl
2728
import maestro.cli.view.box
2829
import maestro.utils.TemporaryDirectory
@@ -135,9 +136,8 @@ class CloudInteractor(
135136
println()
136137
val project = requireNotNull(projectId)
137138
val appId = response.appId
138-
val uploadUrl = uploadUrl(project, appId, client.domain)
139+
val uploadUrl = robinUploadUrl(project, appId, response.uploadId, client.domain)
139140
val deviceMessage = if (response.deviceConfiguration != null) printDeviceInfo(response.deviceConfiguration) else ""
140-
val appBinaryIdResponseId = if (appBinaryId != null) response.appBinaryId else null
141141
return printMaestroCloudResponse(
142142
async,
143143
authToken,
@@ -148,7 +148,7 @@ class CloudInteractor(
148148
uploadUrl,
149149
deviceMessage,
150150
appId,
151-
appBinaryIdResponseId,
151+
response.appBinaryId,
152152
response.uploadId,
153153
projectId,
154154
)
@@ -252,7 +252,7 @@ class CloudInteractor(
252252
private fun printDeviceInfo(deviceConfiguration: DeviceConfiguration): String {
253253
val platform = Platform.fromString(deviceConfiguration.platform)
254254

255-
val line1 = "Maestro Cloud device specs:\n* ${deviceConfiguration.displayInfo} - ${deviceConfiguration.deviceLocale}"
255+
val line1 = "Robin device specs:\n* ${deviceConfiguration.displayInfo} - ${deviceConfiguration.deviceLocale}"
256256
val line2 = "To change OS version use this option: ${if (platform == Platform.IOS) "--ios-version=<version>" else "--android-api-level=<version>"}"
257257
val line3 = "To change device locale use this option: --device-locale=<device_locale>"
258258

maestro-cli/src/main/java/maestro/cli/view/TestSuiteStatusView.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,16 @@ object TestSuiteStatusView {
123123
domain: String = "mobile.dev",
124124
) = "https://console.$domain/uploads/$uploadId?teamId=$teamId&appId=$appId"
125125

126-
fun uploadUrl(
126+
fun robinUploadUrl(
127127
projectId: String,
128128
appId: String,
129+
uploadId: String,
129130
domain: String = ""
130131
): String {
131132
return if (domain.contains("localhost")) {
132-
"http://localhost:3000/project/$projectId/maestro-tests/app/$appId"
133+
"http://localhost:3000/project/$projectId/maestro-test/app/$appId/upload/$uploadId"
133134
} else {
134-
"https://copilot.mobile.dev/project/$projectId/maestro-tests/app/$appId"
135+
"https://app.robintest.com/project/$projectId/maestro-test/app/$appId/upload/$uploadId"
135136
}
136137
}
137138

0 commit comments

Comments
 (0)