diff --git a/tests/robotests/src/com/android/settings/remoteauth/enrolling/RemoteAuthEnrollEnrollingTest.kt b/tests/robotests/src/com/android/settings/remoteauth/enrolling/RemoteAuthEnrollEnrollingTest.kt index d10330512da..3d42f23bba3 100644 --- a/tests/robotests/src/com/android/settings/remoteauth/enrolling/RemoteAuthEnrollEnrollingTest.kt +++ b/tests/robotests/src/com/android/settings/remoteauth/enrolling/RemoteAuthEnrollEnrollingTest.kt @@ -22,7 +22,6 @@ import androidx.test.espresso.Espresso.onView import androidx.test.espresso.assertion.ViewAssertions.matches import androidx.test.espresso.matcher.ViewMatchers.* import com.android.settings.R -import org.hamcrest.core.IsNot.not import org.junit.Before import org.junit.Test import org.junit.runner.RunWith @@ -36,10 +35,10 @@ class RemoteAuthEnrollEnrollingTest { } @Test - fun testRemoteAuthenticatorEnrollEnrolling_hasHeader() { + fun testRemoteAuthenticatorEnrollEnrolling_headerVisible() { onView(withText(R.string.security_settings_remoteauth_enroll_enrolling_title)).check( matches( - isDisplayed() + withEffectiveVisibility(Visibility.VISIBLE) ) ) } @@ -54,12 +53,18 @@ class RemoteAuthEnrollEnrollingTest { } @Test - fun testRemoteAuthenticatorEnrollEnrolling_progressBarNotDisplayed() { - onView(withId(R.id.enrolling_list_progress_bar)).check(matches(not(isDisplayed()))) + fun testRemoteAuthenticatorEnrollEnrolling_progressBarNotVisible() { + onView(withId(R.id.enrolling_list_progress_bar)).check( + matches( + withEffectiveVisibility( + Visibility.INVISIBLE + ) + ) + ) } @Test - fun testRemoteAuthenticatorEnrollEnrolling_errorTextNotDisplayed() { - onView(withId(R.id.error_text)).check(matches(not(isDisplayed()))) + fun testRemoteAuthenticatorEnrollEnrolling_errorTextNotVisible() { + onView(withId(R.id.error_text)).check(matches(withEffectiveVisibility(Visibility.INVISIBLE))) } } \ No newline at end of file diff --git a/tests/robotests/src/com/android/settings/remoteauth/finish/RemoteAuthEnrollFinishTest.kt b/tests/robotests/src/com/android/settings/remoteauth/finish/RemoteAuthEnrollFinishTest.kt index 1ad7dd89692..46ff19c87b8 100644 --- a/tests/robotests/src/com/android/settings/remoteauth/finish/RemoteAuthEnrollFinishTest.kt +++ b/tests/robotests/src/com/android/settings/remoteauth/finish/RemoteAuthEnrollFinishTest.kt @@ -36,19 +36,19 @@ class RemoteAuthEnrollFinishTest { } @Test - fun testRemoteAuthenticatorEnrollFinish_hasHeader() { + fun testRemoteAuthenticatorEnrollFinish_headerVisible() { onView(withText(R.string.security_settings_remoteauth_enroll_finish_title)).check( matches( - isDisplayed() + withEffectiveVisibility(Visibility.VISIBLE) ) ) } @Test - fun testRemoteAuthenticatorEnrollFinish_hasDescription() { + fun testRemoteAuthenticatorEnrollFinish_descriptionVisible() { onView(withText(R.string.security_settings_remoteauth_enroll_finish_description)).check( matches( - isDisplayed() + withEffectiveVisibility(Visibility.VISIBLE) ) ) } diff --git a/tests/robotests/src/com/android/settings/remoteauth/settings/RemoteAuthSettingsTest.kt b/tests/robotests/src/com/android/settings/remoteauth/settings/RemoteAuthSettingsTest.kt index 81286007b20..9b168135410 100644 --- a/tests/robotests/src/com/android/settings/remoteauth/settings/RemoteAuthSettingsTest.kt +++ b/tests/robotests/src/com/android/settings/remoteauth/settings/RemoteAuthSettingsTest.kt @@ -35,19 +35,19 @@ class RemoteAuthSettingsTest { } @Test - fun testRemoteAuthenticatorSettings_hasHeader() { + fun testRemoteAuthenticatorSettings_headerVisible() { onView(withText(R.string.security_settings_remoteauth_settings_title)).check( matches( - isDisplayed() + withEffectiveVisibility(Visibility.VISIBLE) ) ) } @Test - fun testRemoteAuthenticatorSettings_hasDescription() { + fun testRemoteAuthenticatorSettings_descriptionVisible() { onView(withText(R.string.security_settings_remoteauth_settings_description)).check( matches( - isDisplayed() + withEffectiveVisibility(Visibility.VISIBLE) ) ) }