Modified fingerprint enroll test
Test: m -j40 RunSettingsRoboTests ROBOTEST_FILTER=FingerprintEnrollEnrollingTest Bug: 271134136 Change-Id: Ic96407199a8394ac184a60229f371ee93838c926
This commit is contained in:
@@ -63,6 +63,7 @@ import com.android.settings.testutils.FakeFeatureFactory;
|
||||
import com.android.settings.widget.RingProgressBar;
|
||||
|
||||
import com.airbnb.lottie.LottieAnimationView;
|
||||
import com.airbnb.lottie.LottieTask;
|
||||
import com.google.android.setupdesign.GlifLayout;
|
||||
|
||||
import org.junit.Before;
|
||||
@@ -175,6 +176,7 @@ public class FingerprintEnrollEnrollingTest {
|
||||
@Test
|
||||
public void fingerprintUdfpsOverlayEnrollment_PlaysAllAnimationsAssetsCorrectly() {
|
||||
initializeActivityFor(TYPE_UDFPS_OPTICAL);
|
||||
LottieTask.EXECUTOR = mContext.getMainExecutor();
|
||||
|
||||
int initStageSteps = -1, initStageRemaining = 0;
|
||||
final int totalStages = mUdfpsStageThresholds.length;
|
||||
@@ -191,17 +193,8 @@ public class FingerprintEnrollEnrollingTest {
|
||||
mActivity.onEnrollmentProgressChange(TOTAL_ENROLL_STEPS, remaining);
|
||||
}
|
||||
|
||||
List<Integer> expectedLottieAssetOrder = List.of(
|
||||
R.raw.udfps_center_hint_lottie,
|
||||
R.raw.udfps_tip_hint_lottie,
|
||||
R.raw.udfps_left_edge_hint_lottie,
|
||||
R.raw.udfps_right_edge_hint_lottie
|
||||
);
|
||||
|
||||
ArgumentCaptor<Integer> lottieAssetCaptor = ArgumentCaptor.forClass(Integer.class);
|
||||
verify(mIllustrationLottie, times(totalStages)).setAnimation(lottieAssetCaptor.capture());
|
||||
List<Integer> observedLottieAssetOrder = lottieAssetCaptor.getAllValues();
|
||||
assertThat(observedLottieAssetOrder).isEqualTo(expectedLottieAssetOrder);
|
||||
verify(mIllustrationLottie, times(totalStages)).setComposition(any());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -328,8 +321,9 @@ public class FingerprintEnrollEnrollingTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void fingerprintSfpsEnroll_PlaysAllAnimationsAssetsCorrectly() {
|
||||
public void fingerprintSfpsEnroll_PlaysAnimations() {
|
||||
initializeActivityFor(TYPE_POWER_BUTTON);
|
||||
LottieTask.EXECUTOR = mContext.getMainExecutor();
|
||||
|
||||
int initStageSteps = -1, initStageRemaining = 0;
|
||||
|
||||
@@ -345,18 +339,8 @@ public class FingerprintEnrollEnrollingTest {
|
||||
mActivity.onEnrollmentProgressChange(TOTAL_ENROLL_STEPS, remaining);
|
||||
}
|
||||
|
||||
List<Integer> expectedLottieAssetOrder = List.of(
|
||||
R.raw.sfps_lottie_no_animation,
|
||||
R.raw.sfps_lottie_pad_center,
|
||||
R.raw.sfps_lottie_tip,
|
||||
R.raw.sfps_lottie_left_edge,
|
||||
R.raw.sfps_lottie_right_edge
|
||||
);
|
||||
|
||||
ArgumentCaptor<Integer> lottieAssetCaptor = ArgumentCaptor.forClass(Integer.class);
|
||||
verify(mIllustrationLottie, times(5)).setAnimation(lottieAssetCaptor.capture());
|
||||
List<Integer> observedLottieAssetOrder = lottieAssetCaptor.getAllValues();
|
||||
assertThat(observedLottieAssetOrder).isEqualTo(expectedLottieAssetOrder);
|
||||
verify(mIllustrationLottie, times(5)).setComposition(any());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Reference in New Issue
Block a user