Created
August 19, 2021 19:39
-
-
Save rubenquadros/9a300573f8465ef85d98b93f96c35f5a to your computer and use it in GitHub Desktop.
App bar test
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 AppBarTest { | |
@get:Rule val composeTestRule = createComposeRule() | |
@Test | |
fun given_title_should_be_displayed_in_home_app_bar() { | |
// Load our composable | |
composeTestRule.setContent { | |
EpicWorldTheme { | |
HomeAppBar( | |
title = "Title", | |
searchClick = {}, | |
filterClick = {} | |
) | |
} | |
} | |
// onNode - Finder | |
// assertIsDisplayed - Assertion | |
composeTestRule | |
.onNodeWithText("Title") | |
.assertIsDisplayed() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment