Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 05c96d4b authored by Joe Bolinger's avatar Joe Bolinger
Browse files

Re-enable biometric prompt tests.

These were temporarily disabled when the face-to-fingerprint flow was replaced with the coex flow. The test refactor caused presubmit failures because the detach method was not called after the test ended, which could cause unrelated downstream tests to fail.

Bug: 222119218
Test: atest AuthBiometricViewTest
Change-Id: Ie6c18ab2fabe6f42cff9706ad51062ebbad82bd0
parent ad724202
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -42,6 +42,7 @@ import android.view.View;
import com.android.systemui.R;
import com.android.systemui.SysuiTestCase;

import org.junit.After;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
@@ -50,7 +51,6 @@ import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;

@Ignore
@RunWith(AndroidTestingRunner.class)
@RunWithLooper
@SmallTest
@@ -66,6 +66,11 @@ public class AuthBiometricViewTest extends SysuiTestCase {

    private AuthBiometricView mBiometricView;

    @After
    public void tearDown() {
        destroyDialog();
    }

    @Test
    public void testOnAuthenticationSucceeded_noConfirmationRequired_sendsActionAuthenticated() {
        initDialog(false /* allowDeviceCredential */, mCallback);
@@ -245,6 +250,7 @@ public class AuthBiometricViewTest extends SysuiTestCase {
        // TODO: Test dialog size. Should move requireConfirmation to buildBiometricPromptBundle

        // Create new dialog and restore the previous state into it
        destroyDialog();
        initDialog(false /* allowDeviceCredential */, mCallback, state, 10000);
        mBiometricView.mAnimationDurationHideDialog = 10000;
        mBiometricView.setRequireConfirmation(requireConfirmation);
@@ -304,6 +310,12 @@ public class AuthBiometricViewTest extends SysuiTestCase {
        waitForIdleSync();
    }

    private void destroyDialog() {
        if (mBiometricView != null && mBiometricView.isAttachedToWindow()) {
            ViewUtils.detachView(mBiometricView);
        }
    }

    @Override
    protected void waitForIdleSync() {
        TestableLooper.get(this).processAllMessages();