mirror of
https://github.com/bitwarden/android.git
synced 2026-05-21 03:21:29 -05:00
Use string resource for button label (#6897)
This commit is contained in:
@@ -156,7 +156,7 @@ private fun TutorialScreenContent(
|
||||
)
|
||||
|
||||
BitwardenFilledButton(
|
||||
label = state.actionButtonText,
|
||||
label = stringResource(id = state.actionButtonText),
|
||||
onClick = { continueClick(state.index) },
|
||||
modifier = Modifier
|
||||
.standardHorizontalMargin()
|
||||
|
||||
@@ -73,8 +73,12 @@ data class TutorialState(
|
||||
* - Displays "Continue" if the user is not on the last page.
|
||||
* - Displays "Get Started" if the user is on the last page.
|
||||
*/
|
||||
val actionButtonText: String
|
||||
get() = if (index != pages.lastIndex) "Continue" else "Get Started"
|
||||
val actionButtonText: Int
|
||||
get() = if (index != pages.lastIndex) {
|
||||
BitwardenString.continue_text
|
||||
} else {
|
||||
BitwardenString.get_started
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicates whether the current slide is the last in the pages array.
|
||||
|
||||
@@ -79,7 +79,7 @@ class TutorialScreenTest : AuthenticatorComposeTest() {
|
||||
it.copy(pages = listOf(TutorialState.TutorialSlide.UniqueCodesSlide))
|
||||
}
|
||||
composeTestRule
|
||||
.onNodeWithText("Get Started")
|
||||
.onNodeWithText("Get started")
|
||||
.assertExists()
|
||||
.assertIsDisplayed()
|
||||
}
|
||||
@@ -106,7 +106,7 @@ class TutorialScreenTest : AuthenticatorComposeTest() {
|
||||
it.copy(pages = listOf(TutorialState.TutorialSlide.UniqueCodesSlide))
|
||||
}
|
||||
composeTestRule
|
||||
.onNodeWithText("Get Started")
|
||||
.onNodeWithText("Get started")
|
||||
.performClick()
|
||||
verify {
|
||||
viewModel.trySendAction(TutorialAction.ContinueClick(mutableStateFlow.value.index))
|
||||
|
||||
Reference in New Issue
Block a user