Skip to content

Instantly share code, notes, and snippets.

@ferPrieto
Created January 11, 2022 20:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ferPrieto/efd4ebd55dfed1aef83854a90fa5682e to your computer and use it in GitHub Desktop.
This shows the functions that implement the test assertions
fun clickOnLaunchesTab() = launchesTabItem.assertIsDisplayed().performClick()
fun initialElementsShowed() {
launchesTitle.assertIsDisplayed()
dialogFilterButton.assertIsDisplayed()
}
fun listItemsShowed(numItemsShowed: Int) = launchesListItems.assertCountEquals(numItemsShowed)
fun advanceTimeBy(timeToAdvance: Long) = composeTestRule.mainClock.advanceTimeBy(timeToAdvance)
fun errorElementsDisplayed() {
connectionErrorMessage.assertExists().assertIsDisplayed()
connectionErrorAnimation.assertExists().assertIsDisplayed()
}
fun noResultsElementsShowed() {
noResultsText.assertExists().assertIsDisplayed()
listItemsShowed(0)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment