Created
December 29, 2023 14:44
-
-
Save ngallazzi/0136758574a63547b53ae93cb8c5eca6 to your computer and use it in GitHub Desktop.
Common compose Ui tests actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyLayoutTest { | |
@get:Rule | |
val composeTestRule = createAndroidComposeRule<ComponentActivity>() | |
@Test | |
fun testGreetingButtonClick() { | |
composeTestRule.setContent { | |
MyLayout() | |
} | |
composeTestRule.onNodeWithContentDescription( | |
"Greeting Button" | |
).performClick() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment