Skip to content

Instantly share code, notes, and snippets.

@stoefln
Last active February 14, 2022 10:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stoefln/68ea61ecf0a6eebc8616dfaaabf3646f to your computer and use it in GitHub Desktop.
Save stoefln/68ea61ecf0a6eebc8616dfaaabf3646f to your computer and use it in GitHub Desktop.
@Test
fun clickIncrementButton_counterUpdated() {
// The counterScreen block is a top-level function that you need to implement in your robot
counterScreen {
given {
// make sure counter is reset
resetCounter()
}
perform {
// launch Activity
launchActivityScenario<CounterActivity>()
// increment the counter
clickIncrementButton()
}
check {
// assert that counter has been updated
counterDisplayed(expectedValue = 1)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment