mirror of
https://github.com/bitwarden/android.git
synced 2026-06-02 11:12:00 -05:00
BIT-544: Apply reskin to LandingScreen (#71)
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user