Skip option missing on pattern lock screen
- Skip present during suw/deferred + non-fingerprint flow - Skip hidden when opened from settings - Skip hidden during suw/deferred when trying to setup up fingerprint Test: Manually verified, robolectric tests updated bug: 71763670 Change-Id: Ie3aac68a6d04c7727320af83532640580248bd47
This commit is contained in:
@@ -102,6 +102,33 @@ public class SetupChooseLockPatternTest {
|
||||
assertThat(count).named("List items shown").isEqualTo(3);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void skipButton_shouldBeVisible_duringNonFingerprintFlow() {
|
||||
Button button = mActivity.findViewById(R.id.footerLeftButton);
|
||||
assertThat(button).isNotNull();
|
||||
assertThat(button.getVisibility()).isEqualTo(View.VISIBLE);
|
||||
|
||||
button.performClick();
|
||||
AlertDialog chooserDialog = ShadowAlertDialog.getLatestAlertDialog();
|
||||
assertThat(chooserDialog).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void skipButton_shouldNotBeVisible_duringFingerprintFlow() {
|
||||
mActivity = Robolectric.buildActivity(
|
||||
SetupChooseLockPattern.class,
|
||||
SetupChooseLockPattern.modifyIntentForSetup(
|
||||
application,
|
||||
new IntentBuilder(application)
|
||||
.setUserId(UserHandle.myUserId())
|
||||
.setForFingerprint(true)
|
||||
.build()))
|
||||
.setup().get();
|
||||
Button button = mActivity.findViewById(R.id.footerLeftButton);
|
||||
assertThat(button).isNotNull();
|
||||
assertThat(button.getVisibility()).isEqualTo(View.GONE);
|
||||
}
|
||||
|
||||
private ChooseLockPatternFragment findFragment(Activity activity) {
|
||||
return (ChooseLockPatternFragment)
|
||||
activity.getFragmentManager().findFragmentById(R.id.main_content);
|
||||
|
Reference in New Issue
Block a user