From 31812480e64e07a16e22b2320884db6632f3b981 Mon Sep 17 00:00:00 2001 From: Xavier Molloy Date: Fri, 6 Oct 2023 08:56:05 +0200 Subject: [PATCH] fix test --- .../dhis/mobile/ui/designsystem/component/InputPhoneNumber.kt | 1 - .../mobile/ui/designsystem/component/InputPhoneNumberTest.kt | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/designsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/InputPhoneNumber.kt b/designsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/InputPhoneNumber.kt index 8c3f0b8a1..24b5e74c9 100644 --- a/designsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/InputPhoneNumber.kt +++ b/designsystem/src/commonMain/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/InputPhoneNumber.kt @@ -76,7 +76,6 @@ fun InputPhoneNumber( }, onClick = { onCallActionClicked.invoke() - onFocusChanged(true) }, ) }, diff --git a/designsystem/src/desktopTest/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/InputPhoneNumberTest.kt b/designsystem/src/desktopTest/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/InputPhoneNumberTest.kt index 465a6fc54..d7cf654e1 100644 --- a/designsystem/src/desktopTest/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/InputPhoneNumberTest.kt +++ b/designsystem/src/desktopTest/kotlin/org/hisp/dhis/mobile/ui/designsystem/component/InputPhoneNumberTest.kt @@ -44,7 +44,7 @@ class InputPhoneNumberTest { } @Test - fun shouldDisplaySupportTextIfInputStateIsError() { + fun shouldDisplaySupportText() { rule.setContent { InputPhoneNumber( title = "Phone Number", @@ -71,6 +71,7 @@ class InputPhoneNumberTest { onCallActionClicked = { // no-op }, + supportingText = listOf(SupportingTextData("Error", SupportingTextState.ERROR)), ) } rule.onNodeWithTag("INPUT_PHONE_NUMBER_SUPPORTING_TEXT").assertExists()