Skip to content

Commit

Permalink
Fix web support for workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
jkronborg committed Jan 23, 2025
1 parent dcd2f20 commit 2b87295
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions maestro-cli/src/main/java/maestro/cli/command/TestCommand.kt
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,8 @@ class TestCommand : Callable<Int> {
private val usedPorts = ConcurrentHashMap<Int, Boolean>()
private val logger = LoggerFactory.getLogger(TestCommand::class.java)

private fun isWebFlow(): Boolean {
if (flowFiles.isSingleFile) {
return flowFiles.first().isWebFlow()
}

return false
private fun includesWebFlow(): Boolean {
return flowFiles.any { it.isWebFlow() }
}

override fun call(): Int {
Expand Down Expand Up @@ -218,7 +214,7 @@ class TestCommand : Callable<Int> {
val onlySequenceFlows = plan.sequence.flows.isNotEmpty() && plan.flowsToRun.isEmpty() // An edge case

val availableDevices = DeviceService.listConnectedDevices(
includeWeb = isWebFlow(),
includeWeb = includesWebFlow(),
host = parent?.host,
port = parent?.port,
).map { it.instanceId }.toSet()
Expand Down Expand Up @@ -427,7 +423,7 @@ class TestCommand : Callable<Int> {
}

private fun getPassedOptionsDeviceIds(): List<String> {
val arguments = if (isWebFlow()) {
val arguments = if (includesWebFlow()) {
PrintUtils.warn("Web support is in Beta. We would appreciate your feedback!\n")
"chromium"
} else parent?.deviceId
Expand Down

0 comments on commit 2b87295

Please sign in to comment.