Fix lint warning

This commit is contained in:
Alex Gabor 2022-04-11 11:29:40 +03:00
parent d83cc23ee9
commit 5f960880de
2 changed files with 3 additions and 2 deletions

View file

@ -14,7 +14,7 @@ import org.fnives.test.showcase.compose.screen.auth.AuthScreenTag
class ComposeLoginRobot( class ComposeLoginRobot(
composeTestRule: ComposeTestRule, composeTestRule: ComposeTestRule,
): ComposeTestRule by composeTestRule { ) : ComposeTestRule by composeTestRule {
fun setUsername(username: String): ComposeLoginRobot = apply { fun setUsername(username: String): ComposeLoginRobot = apply {
onNodeWithTag(AuthScreenTag.UsernameInput).performTextInput(username) onNodeWithTag(AuthScreenTag.UsernameInput).performTextInput(username)
@ -40,6 +40,7 @@ class ComposeLoginRobot(
fun assertLoading(): ComposeLoginRobot = apply { fun assertLoading(): ComposeLoginRobot = apply {
onNodeWithTag(AuthScreenTag.LoadingIndicator).assertIsDisplayed() onNodeWithTag(AuthScreenTag.LoadingIndicator).assertIsDisplayed()
} }
fun assertNotLoading(): ComposeLoginRobot = apply { fun assertNotLoading(): ComposeLoginRobot = apply {
onAllNodesWithTag(AuthScreenTag.LoadingIndicator).assertCountEquals(0) onAllNodesWithTag(AuthScreenTag.LoadingIndicator).assertCountEquals(0)
} }

View file

@ -23,7 +23,7 @@ Here is a list of actions we want to do:
```kotlin ```kotlin
class ComposeLoginRobot( class ComposeLoginRobot(
composeTestRule: ComposeTestRule, composeTestRule: ComposeTestRule,
): ComposeTestRule by composeTestRule { ) : ComposeTestRule by composeTestRule {
fun setUsername(username: String): ComposeLoginRobot = apply { fun setUsername(username: String): ComposeLoginRobot = apply {
onNodeWithTag(AuthScreenTag.UsernameInput).performTextInput(username) onNodeWithTag(AuthScreenTag.UsernameInput).performTextInput(username)