Last active
January 5, 2022 00:18
-
-
Save ferPrieto/9fd4054541cfb3a7c01198bef6dc3888 to your computer and use it in GitHub Desktop.
This is the simplified test using MockWebServer
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
@ExperimentalMaterialApi | |
@RunWith(AndroidJUnit4::class) | |
@HiltAndroidTest | |
class LaunchesScreenKtTest : BaseScreenTest() { | |
@Test | |
@InternalCoroutinesApi | |
fun visibleItemsCountAfterOpeningTheScreen() { | |
mockWebServer.dispatcher = SuccessDispatcher() | |
setMainContent() | |
composeTestRule.apply{ | |
onNodeWithText("Launches").assertIsDisplayed().performClick() | |
mainClock.advanceTimeBy(2000) | |
onAllNodesWithContentDescription( | |
"Item", | |
substring = true, | |
useUnmergedTree = true | |
).assertCountEquals(6) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment