Skip to content

Commit 9721a56

Browse files
fix: description for optional elements
1 parent c52a031 commit 9721a56

File tree

1 file changed

+2
-2
lines changed
  • maestro-orchestra-models/src/main/java/maestro/orchestra

1 file changed

+2
-2
lines changed

maestro-orchestra-models/src/main/java/maestro/orchestra/Commands.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ data class TapOnElementCommand(
266266
) : Command {
267267

268268
override fun description(): String {
269-
val optional = if (optional) "(Optional) " else ""
269+
val optional = if (optional || selector.optional) "(Optional) " else ""
270270
return label ?: "${tapOnDescription(longPress, repeat)} on $optional${selector.description()}"
271271
}
272272

@@ -381,7 +381,7 @@ data class AssertConditionCommand(
381381
}
382382

383383
override fun description(): String {
384-
val optional = if (optional) "(Optional) " else ""
384+
val optional = if (optional || condition.visible?.optional == true || condition.notVisible?.optional == true ) "(Optional) " else ""
385385
return label ?: "Assert that $optional${condition.description()}"
386386
}
387387

0 commit comments

Comments
 (0)