Skip to content

Instantly share code, notes, and snippets.

@ferPrieto
Created January 13, 2022 21:19
Show Gist options
  • Save ferPrieto/b1ff9f3cbe29da20cd54225bc71e87f0 to your computer and use it in GitHub Desktop.
Save ferPrieto/b1ff9f3cbe29da20cd54225bc71e87f0 to your computer and use it in GitHub Desktop.
For this demonstration, the dispatcher initialisation and content setup (composeTestRule.setContent) was omitted for simplicity
@Test
fun elementsVisibilityAfterOpeningTheScreen() {
launchesScreenRobot(composeTestRule) {
clickOnLaunchesTab()
initialElementsShowed()
}
}
@Test
fun elementsVisibilityAfterOpeningTheScreen() {
composeTestRule.apply {
onNodeWithText("Launches").performClick()
onNodeWithContentDescription(
"Launches Animation",
useUnmergedTree = true
).assertIsDisplayed()
onNodeWithContentDescription("Filter Button").assertIsDisplayed()
onNodeWithText("LAUNCHES").assertIsDisplayed()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment