mirror of
https://github.com/bitwarden/android.git
synced 2026-06-01 10:16:47 -05:00
Minor updates to the text fields (#266)
This commit is contained in:
@@ -114,13 +114,22 @@ class EnvironmentScreenTest : BaseComposeTest() {
|
||||
.onNodeWithText("Server URL")
|
||||
// Click to focus to see placeholder
|
||||
.performClick()
|
||||
.assertTextEquals("Server URL", "ex. https://bitwarden.company.com", "")
|
||||
.assertTextEquals(
|
||||
"Server URL",
|
||||
"Specify the base URL of your on-premise hosted Bitwarden installation.",
|
||||
"ex. https://bitwarden.company.com",
|
||||
"",
|
||||
)
|
||||
|
||||
mutableStateFlow.update { it.copy(serverUrl = "server-url") }
|
||||
|
||||
composeTestRule
|
||||
.onNodeWithText("Server URL")
|
||||
.assertTextEquals("Server URL", "server-url")
|
||||
.assertTextEquals(
|
||||
"Server URL",
|
||||
"Specify the base URL of your on-premise hosted Bitwarden installation.",
|
||||
"server-url",
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -216,13 +225,21 @@ class EnvironmentScreenTest : BaseComposeTest() {
|
||||
fun `icons server URL should change according to the state`() {
|
||||
composeTestRule
|
||||
.onNodeWithText("Icons server URL")
|
||||
.assertTextEquals("Icons server URL", "")
|
||||
.assertTextEquals(
|
||||
"Icons server URL",
|
||||
"For advanced users. You can specify the base URL of each service independently.",
|
||||
"",
|
||||
)
|
||||
|
||||
mutableStateFlow.update { it.copy(iconsServerUrl = "icons-url") }
|
||||
|
||||
composeTestRule
|
||||
.onNodeWithText("Icons server URL")
|
||||
.assertTextEquals("Icons server URL", "icons-url")
|
||||
.assertTextEquals(
|
||||
"Icons server URL",
|
||||
"For advanced users. You can specify the base URL of each service independently.",
|
||||
"icons-url",
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -78,14 +78,22 @@ class NewSendScreenTest : BaseComposeTest() {
|
||||
fun `name input should change according to the state`() {
|
||||
composeTestRule
|
||||
.onNodeWithText("Name")
|
||||
.assertTextEquals("Name", "")
|
||||
.assertTextEquals(
|
||||
"Name",
|
||||
"A friendly name to describe this Send.",
|
||||
"",
|
||||
)
|
||||
|
||||
mutableStateFlow.update {
|
||||
it.copy(name = "input")
|
||||
}
|
||||
composeTestRule
|
||||
.onNodeWithText("Name")
|
||||
.assertTextEquals("Name", "input")
|
||||
.assertTextEquals(
|
||||
"Name",
|
||||
"A friendly name to describe this Send.",
|
||||
"input",
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -129,7 +137,11 @@ class NewSendScreenTest : BaseComposeTest() {
|
||||
composeTestRule
|
||||
.onAllNodesWithText("Text")
|
||||
.filterToOne(hasSetTextAction())
|
||||
.assertTextEquals("Text", "")
|
||||
.assertTextEquals(
|
||||
"Text",
|
||||
"The text you want to send.",
|
||||
"",
|
||||
)
|
||||
|
||||
mutableStateFlow.update {
|
||||
it.copy(
|
||||
@@ -142,7 +154,11 @@ class NewSendScreenTest : BaseComposeTest() {
|
||||
composeTestRule
|
||||
.onAllNodesWithText("Text")
|
||||
.filterToOne(hasSetTextAction())
|
||||
.assertTextEquals("Text", "input")
|
||||
.assertTextEquals(
|
||||
"Text",
|
||||
"The text you want to send.",
|
||||
"input",
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -311,7 +327,11 @@ class NewSendScreenTest : BaseComposeTest() {
|
||||
.performClick()
|
||||
composeTestRule
|
||||
.onNodeWithText("New password")
|
||||
.assertTextEquals("New password", "")
|
||||
.assertTextEquals(
|
||||
"New password",
|
||||
"Optionally require a password for users to access this Send.",
|
||||
"",
|
||||
)
|
||||
|
||||
mutableStateFlow.update {
|
||||
it.copy(
|
||||
@@ -320,7 +340,11 @@ class NewSendScreenTest : BaseComposeTest() {
|
||||
}
|
||||
composeTestRule
|
||||
.onNodeWithText("New password")
|
||||
.assertTextEquals("New password", "•••••")
|
||||
.assertTextEquals(
|
||||
"New password",
|
||||
"Optionally require a password for users to access this Send.",
|
||||
"•••••",
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -346,7 +370,11 @@ class NewSendScreenTest : BaseComposeTest() {
|
||||
.performClick()
|
||||
composeTestRule
|
||||
.onNodeWithText("Notes")
|
||||
.assertTextEquals("Notes", "")
|
||||
.assertTextEquals(
|
||||
"Notes",
|
||||
"Private notes about this Send.",
|
||||
"",
|
||||
)
|
||||
|
||||
mutableStateFlow.update {
|
||||
it.copy(
|
||||
@@ -355,7 +383,11 @@ class NewSendScreenTest : BaseComposeTest() {
|
||||
}
|
||||
composeTestRule
|
||||
.onNodeWithText("Notes")
|
||||
.assertTextEquals("Notes", "input")
|
||||
.assertTextEquals(
|
||||
"Notes",
|
||||
"Private notes about this Send.",
|
||||
"input",
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user