Created
October 21, 2022 13:07
-
-
Save krzdabrowski/6fdb13a4a7a214a778df13d55734c7ad to your computer and use it in GitHub Desktop.
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 RocketsListContentTest { | |
@get:Rule | |
val composeTestRule = createComposeRule() | |
private val testRockets = generateTestRocketsFromPresentation() | |
@Before | |
fun setUp() { | |
composeTestRule.setContent { | |
RocketsListContent( | |
rocketList = testRockets, | |
onRocketClick = { } | |
) | |
} | |
} | |
@Test | |
fun rocketsListContent_shouldNotShowTheDividerAfterLastItem() { | |
val expectedDividerCount = testRockets.size - 1 | |
composeTestRule | |
.onAllNodesWithTag(ROCKET_DIVIDER_TEST_TAG) | |
.assertCountEquals(expectedDividerCount) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment