Created
October 4, 2021 20:58
-
-
Save mcatta/85e649398b28ed4d7a06b68e0ca88c08 to your computer and use it in GitHub Desktop.
UI testing with robot pattern
This file contains hidden or 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
| @HiltAndroidTest | |
| internal class RepositoriesListingTest: BaseAndroidComposeTest() { | |
| override fun provideTestInstance() = this | |
| @Test | |
| fun testConfirmButtonBehaviour() { | |
| welcomeRobotScreen { | |
| isConfirmEnabled(false) | |
| typeUsername("mcatta") | |
| isConfirmEnabled(true) | |
| typeUsername("") | |
| isConfirmEnabled(false) | |
| typeUsername("mcatta") | |
| } | |
| } | |
| @Test | |
| fun testRepositoriesListing() { | |
| coEvery { githubRepository.repositoriesByName(any()) } returns listOf( | |
| TestUtils.fakeRepo(), TestUtils.fakeRepo() | |
| ) | |
| welcomeRobotScreen { | |
| typeUsername("mcatta") | |
| isConfirmEnabled(true) | |
| } confirmUsername { | |
| countRepositories(2) | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment