Skip to content

Instantly share code, notes, and snippets.

@ngallazzi
Created December 29, 2023 14:46
Show Gist options
  • Save ngallazzi/349c6c6379a51e1a4edefd47f80e9f63 to your computer and use it in GitHub Desktop.
Save ngallazzi/349c6c6379a51e1a4edefd47f80e9f63 to your computer and use it in GitHub Desktop.
matchers
class MyLayoutTest {
@get:Rule
val composeTestRule = createAndroidComposeRule<ComponentActivity>()
@Test
fun testGreetingButtonClick() {
composeTestRule.setContent {
MyLayout()
}
composeTestRule.onNode(hasParent(hasText(“Greeting Button”))
).performClick()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment