Skip to content

Commit

Permalink
fix: description for optional elements
Browse files Browse the repository at this point in the history
  • Loading branch information
amanjeetsingh150 committed Oct 7, 2024
1 parent c52a031 commit 9721a56
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ data class TapOnElementCommand(
) : Command {

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

Expand Down Expand Up @@ -381,7 +381,7 @@ data class AssertConditionCommand(
}

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

Expand Down

0 comments on commit 9721a56

Please sign in to comment.