diff --git a/app/src/androidTest/java/org/fnives/test/showcase/ui/ComposeLoginRobot.kt b/app/src/androidTest/java/org/fnives/test/showcase/ui/ComposeLoginRobot.kt index 4a4b1a6..1791ed1 100644 --- a/app/src/androidTest/java/org/fnives/test/showcase/ui/ComposeLoginRobot.kt +++ b/app/src/androidTest/java/org/fnives/test/showcase/ui/ComposeLoginRobot.kt @@ -14,7 +14,7 @@ import org.fnives.test.showcase.compose.screen.auth.AuthScreenTag class ComposeLoginRobot( composeTestRule: ComposeTestRule, -): ComposeTestRule by composeTestRule { +) : ComposeTestRule by composeTestRule { fun setUsername(username: String): ComposeLoginRobot = apply { onNodeWithTag(AuthScreenTag.UsernameInput).performTextInput(username) @@ -40,6 +40,7 @@ class ComposeLoginRobot( fun assertLoading(): ComposeLoginRobot = apply { onNodeWithTag(AuthScreenTag.LoadingIndicator).assertIsDisplayed() } + fun assertNotLoading(): ComposeLoginRobot = apply { onAllNodesWithTag(AuthScreenTag.LoadingIndicator).assertCountEquals(0) } diff --git a/codekata/compose.instructionset.md b/codekata/compose.instructionset.md index 68b4ca3..2de8d66 100644 --- a/codekata/compose.instructionset.md +++ b/codekata/compose.instructionset.md @@ -23,7 +23,7 @@ Here is a list of actions we want to do: ```kotlin class ComposeLoginRobot( composeTestRule: ComposeTestRule, -): ComposeTestRule by composeTestRule { +) : ComposeTestRule by composeTestRule { fun setUsername(username: String): ComposeLoginRobot = apply { onNodeWithTag(AuthScreenTag.UsernameInput).performTextInput(username)