Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKohan committed Oct 16, 2024
1 parent 9e7d236 commit f436fe0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ data class EraseTextCommand(

data class TakeScreenshotCommand(
val path: String,
val cropOn: ElementSelector?,
val cropOn: ElementSelector? = null,
override val label: String? = null,
override val optional: Boolean = false,
) : Command {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ internal class MaestroCommandSerializationTest {
fun `serialize TakeScreenshotCommand`() {
// given
val command = MaestroCommand(
TakeScreenshotCommand("screenshot.png")
TakeScreenshotCommand("screenshot.png", cropOn = ElementSelector(textRegex = "[A-f0-9]"))
)

// when
Expand All @@ -441,6 +441,10 @@ internal class MaestroCommandSerializationTest {
{
"takeScreenshotCommand" : {
"path" : "screenshot.png",
"cropOn" : {
"textRegex" : "[A-f0-9]",
"optional" : false
},
"optional" : false
}
}
Expand Down

0 comments on commit f436fe0

Please sign in to comment.