Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
hamza-vd authored and ndegwamartin committed Feb 19, 2024
1 parent 35de46f commit 7b04c19
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,29 @@ class LoginScreenTest {
)
}

@Test
fun testAppTitleLoginConfigShouldHideAppTitleWhenFalse() {
val appConfigs =
ApplicationConfiguration(
appTitle = "My app",
appId = "app/debug",
loginConfig = LoginConfig(showLogo = true, showAppTitle = false),
)
composeRule.setContent {
LoginPage(
applicationConfiguration = appConfigs,
username = "user",
onUsernameChanged = { listenerObjectSpy.onUsernameUpdated() },
password = "password",
onPasswordChanged = { listenerObjectSpy.onPasswordUpdated() },
forgotPassword = { listenerObjectSpy.forgotPassword() },
onLoginButtonClicked = { listenerObjectSpy.attemptRemoteLogin() },
appVersionPair = Pair(1, "1.0.1"),
)
}
composeRule.onNodeWithTag(APP_NAME_TEXT_TAG).assertDoesNotExist()
}

private fun verifyUnknownTextErrorMessage(loginErrorState: LoginErrorState, errorMessageId: Int) {
composeRule.setContent {
LoginPage(
Expand Down

0 comments on commit 7b04c19

Please sign in to comment.