Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
hamza-vd committed Feb 15, 2024
1 parent 17a480f commit 94d0c88
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 94d0c88

Please sign in to comment.