mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 07:05:35 +03:00
BIT-751 Remove submit button at bottom of create account (#97)
This commit is contained in:
parent
a95a07f313
commit
623c71aa1f
2 changed files with 1 additions and 22 deletions
|
@ -26,7 +26,6 @@ import com.x8bit.bitwarden.ui.auth.feature.createaccount.CreateAccountAction.Pas
|
|||
import com.x8bit.bitwarden.ui.auth.feature.createaccount.CreateAccountAction.PasswordInputChange
|
||||
import com.x8bit.bitwarden.ui.platform.base.util.EventsEffect
|
||||
import com.x8bit.bitwarden.ui.platform.components.BitwardenBasicDialog
|
||||
import com.x8bit.bitwarden.ui.platform.components.BitwardenFilledButton
|
||||
import com.x8bit.bitwarden.ui.platform.components.BitwardenPasswordField
|
||||
import com.x8bit.bitwarden.ui.platform.components.BitwardenTextButtonTopAppBar
|
||||
import com.x8bit.bitwarden.ui.platform.components.BitwardenTextField
|
||||
|
@ -107,12 +106,6 @@ fun CreateAccountScreen(
|
|||
onValueChange = remember { { viewModel.trySendAction(PasswordHintChange(it)) } },
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
)
|
||||
BitwardenFilledButton(
|
||||
label = stringResource(id = R.string.submit),
|
||||
onClick = remember { { viewModel.trySendAction(CreateAccountAction.SubmitClick) } },
|
||||
isEnabled = true,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,21 +38,7 @@ class CreateAccountScreenTest : BaseComposeTest() {
|
|||
composeTestRule.setContent {
|
||||
CreateAccountScreen(onNavigateBack = {}, viewModel = viewModel)
|
||||
}
|
||||
composeTestRule.onAllNodesWithText("Submit")[0].performClick()
|
||||
verify { viewModel.trySendAction(SubmitClick) }
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `bottom button submit click should send SubmitClick action`() {
|
||||
val viewModel = mockk<CreateAccountViewModel>(relaxed = true) {
|
||||
every { stateFlow } returns MutableStateFlow(DEFAULT_STATE)
|
||||
every { eventFlow } returns emptyFlow()
|
||||
every { trySendAction(SubmitClick) } returns Unit
|
||||
}
|
||||
composeTestRule.setContent {
|
||||
CreateAccountScreen(onNavigateBack = {}, viewModel = viewModel)
|
||||
}
|
||||
composeTestRule.onAllNodesWithText("Submit")[1].performClick()
|
||||
composeTestRule.onNodeWithText("Submit").performClick()
|
||||
verify { viewModel.trySendAction(SubmitClick) }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue