Remote authenticator enrollment introduction layout.

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

Bug: b/293908278
Test: atest RemoteAuthEnrollIntroductionTest
Change-Id: Ia20662e897f925d82547550e25b79a2e61d2dc34
This commit is contained in:
Justin McClain
2023-08-08 19:03:57 +00:00
parent 524643a6c8
commit f71909220b
12 changed files with 634 additions and 7 deletions

View File

@@ -0,0 +1,52 @@
/*
* 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.introduction
import android.content.Context
import android.os.Bundle
import androidx.fragment.app.testing.launchFragmentInContainer
import androidx.test.core.app.ApplicationProvider
import com.android.settings.R
import com.google.android.setupdesign.GlifLayout
import com.google.common.truth.Truth.assertThat
import org.junit.Test
import org.junit.runner.RunWith
import org.robolectric.RobolectricTestRunner
@RunWith(RobolectricTestRunner::class)
class RemoteAuthEnrollIntroductionTest {
private var mContext : Context = ApplicationProvider.getApplicationContext()
@Test
fun testRemoteAuthenticatorEnrollIntroduction_hasHeader() {
launchFragmentInContainer<RemoteAuthEnrollIntroduction>(Bundle(), R.style.SudThemeGlif)
.onFragment {
assertThat((it.view as GlifLayout).headerText)
.isEqualTo(mContext.getString(R.string.security_settings_remoteauth_enroll_introduction_title))
}
}
@Test
fun testRemoteAuthenticatorEnrollIntroduction_hasDescription() {
launchFragmentInContainer<RemoteAuthEnrollIntroduction>(Bundle(), R.style.SudThemeGlif)
.onFragment {
assertThat((it.view as GlifLayout).descriptionText)
.isEqualTo(mContext.getString(R.string.security_settings_remoteauth_enroll_introduction_message))
}
}
}