Skip to content

Instantly share code, notes, and snippets.

@aqua30
Created August 27, 2022 09:59
Show Gist options
  • Save aqua30/71a8f959a7e98c4d026d17e65fbaeea2 to your computer and use it in GitHub Desktop.
Save aqua30/71a8f959a7e98c4d026d17e65fbaeea2 to your computer and use it in GitHub Desktop.
@Test
fun withInput_as_1_onButtonClick_displayOnTop() {
// mimic the user inputting the text
composeTestRule.onNodeWithTag("Input").performTextInput("1")
// mimic if the user clicked on the button
composeTestRule.onNodeWithText("Copy").performClick()
// mimic if the user is shown the desired text on UI
composeTestRule.onNodeWithTag("Counter Display").assertTextContains("Counter = 1")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment