Remote authenticator enrollment enrolling layout.

This flow will be included in Device Unlock settings with the
Fingerprint and Face Unlock.

Bug: b/293908453
Test: atest RemoteAuthEnrollEnrollingTest
Change-Id: I56c7fb2481ace359813c27e7538bec0baceffced
This commit is contained in:
Justin McClain
2023-08-10 14:50:26 +00:00
parent 3b56d1fca5
commit 5c739de558
11 changed files with 542 additions and 1 deletions

View File

@@ -0,0 +1,65 @@
/*
* Copyright (C) 2023 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.settings.remoteauth.enrolling
import android.os.Bundle
import androidx.fragment.app.testing.launchFragmentInContainer
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
import org.robolectric.RobolectricTestRunner
@RunWith(RobolectricTestRunner::class)
class RemoteAuthEnrollEnrollingTest {
@Before
fun setup() {
launchFragmentInContainer<RemoteAuthEnrollEnrolling>(Bundle(), R.style.SudThemeGlif)
}
@Test
fun testRemoteAuthenticatorEnrollEnrolling_hasHeader() {
onView(withText(R.string.security_settings_remoteauth_enroll_enrolling_title)).check(
matches(
isDisplayed()
)
)
}
@Test
fun testRemoteAuthenticatorEnrollEnrolling_primaryButtonDisabled() {
onView(withText(R.string.security_settings_remoteauth_enroll_enrolling_agree)).check(
matches(
isNotEnabled()
)
)
}
@Test
fun testRemoteAuthenticatorEnrollEnrolling_progressBarNotDisplayed() {
onView(withId(R.id.enrolling_list_progress_bar)).check(matches(not(isDisplayed())))
}
@Test
fun testRemoteAuthenticatorEnrollEnrolling_errorTextNotDisplayed() {
onView(withId(R.id.error_text)).check(matches(not(isDisplayed())))
}
}