BIT-544: Apply reskin to LandingScreen (#71)

This commit is contained in:
Brian Yencho
2023-09-28 09:29:32 -05:00
committed by GitHub
parent a115635716
commit 191e78a492
7 changed files with 326 additions and 72 deletions

View File

@@ -1,8 +1,11 @@
package com.x8bit.bitwarden.ui.auth.feature.landing
import androidx.compose.ui.test.onNodeWithTag
import androidx.compose.ui.test.filterToOne
import androidx.compose.ui.test.hasClickAction
import androidx.compose.ui.test.onChildren
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.compose.ui.test.performScrollTo
import androidx.compose.ui.test.performTextInput
import com.x8bit.bitwarden.ui.platform.base.BaseComposeTest
import io.mockk.every
@@ -35,7 +38,7 @@ class LandingScreenTest : BaseComposeTest() {
viewModel = viewModel,
)
}
composeTestRule.onNodeWithTag("Continue button").performClick()
composeTestRule.onNodeWithText("Continue").performClick()
verify {
viewModel.trySendAction(LandingAction.ContinueButtonClick)
}
@@ -60,7 +63,11 @@ class LandingScreenTest : BaseComposeTest() {
viewModel = viewModel,
)
}
composeTestRule.onNodeWithTag("Remember me").performClick()
composeTestRule
.onNodeWithText("Remember me")
.onChildren()
.filterToOne(hasClickAction())
.performClick()
verify {
viewModel.trySendAction(LandingAction.RememberMeToggle(true))
}
@@ -85,7 +92,7 @@ class LandingScreenTest : BaseComposeTest() {
viewModel = viewModel,
)
}
composeTestRule.onNodeWithText("Create account").performClick()
composeTestRule.onNodeWithText("Create account").performScrollTo().performClick()
verify {
viewModel.trySendAction(LandingAction.CreateAccountClick)
}
@@ -111,7 +118,7 @@ class LandingScreenTest : BaseComposeTest() {
viewModel = viewModel,
)
}
composeTestRule.onNodeWithTag("Email address").performTextInput(input)
composeTestRule.onNodeWithText("Email address").performTextInput(input)
verify {
viewModel.trySendAction(LandingAction.EmailInputChanged(input))
}