use of com.google.android.setupcompat.PartnerCustomizationLayout in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SetupChooseLockPasswordAppTest method clearIsShown_when_somethingEnteredToConfirm.
@Test
public void clearIsShown_when_somethingEnteredToConfirm() {
SetupChooseLockPassword activity = mActivityTestRule.launchActivity(null);
PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
onView(withId(R.id.password_entry)).perform(ViewActions.typeText("1234")).perform(pressKey(KeyEvent.KEYCODE_ENTER));
mActivityTestRule.launchActivity(null);
onView(withId(R.id.password_entry)).perform(ViewActions.typeText("1234")).perform(pressKey(KeyEvent.KEYCODE_ENTER)).perform(ViewActions.typeText("1"));
// clear should be present if text field contains content
assertThat(layout.getMixin(FooterBarMixin.class).getSecondaryButtonView().getVisibility()).isEqualTo(View.VISIBLE);
}
use of com.google.android.setupcompat.PartnerCustomizationLayout in project android_packages_apps_Settings by omnirom.
the class SetupChooseLockPasswordAppTest method clearIsNotShown_when_activityLaunchedInitially.
@Test
public void clearIsNotShown_when_activityLaunchedInitially() {
SetupChooseLockPassword activity = mActivityTestRule.launchActivity(null);
PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
assertThat(layout.getMixin(FooterBarMixin.class).getSecondaryButtonView().getText()).isEqualTo(mContext.getString(R.string.lockpassword_clear_label));
}
use of com.google.android.setupcompat.PartnerCustomizationLayout in project android_packages_apps_Settings by omnirom.
the class SetupChooseLockPasswordAppTest method testSkipDialogIsShown.
@Test
public void testSkipDialogIsShown() throws Throwable {
SetupChooseLockPassword activity = mActivityTestRule.launchActivity(null);
PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
final Button skipOrClearButton = layout.getMixin(FooterBarMixin.class).getSecondaryButtonView();
assertThat(skipOrClearButton.getText()).isEqualTo(mContext.getString(R.string.skip_label));
assertThat(skipOrClearButton.getVisibility()).isEqualTo(View.VISIBLE);
skipOrClearButton.performClick();
assertWithMessage("Is finishing").that(activity.isFinishing()).isTrue();
}
use of com.google.android.setupcompat.PartnerCustomizationLayout in project android_packages_apps_Settings by omnirom.
the class SetupChooseLockPasswordAppTest method clearIsNotShown_when_nothingEntered.
@Test
public void clearIsNotShown_when_nothingEntered() throws Throwable {
SetupChooseLockPassword activity = mActivityTestRule.launchActivity(null);
PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
onView(withId(R.id.password_entry)).perform(ViewActions.typeText("1234")).perform(pressKey(KeyEvent.KEYCODE_ENTER));
assertThat(layout.getMixin(FooterBarMixin.class).getSecondaryButtonView().getVisibility()).isEqualTo(View.GONE);
}
use of com.google.android.setupcompat.PartnerCustomizationLayout in project android_packages_apps_Settings by omnirom.
the class SetupFingerprintEnrollIntroductionTest method testLockPattern.
@Test
public void testLockPattern() {
ShadowStorageManager.setIsFileEncryptedNativeOrEmulated(false);
mController.create().postCreate(null).resume();
SetupFingerprintEnrollIntroduction activity = mController.get();
PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
layout.getMixin(FooterBarMixin.class).getPrimaryButtonView().performClick();
ShadowActivity shadowActivity = Shadows.shadowOf(activity);
IntentForResult startedActivity = shadowActivity.getNextStartedActivityForResult();
assertThat(startedActivity).isNotNull();
assertThat(startedActivity.intent.hasExtra(SetupChooseLockGenericFragment.EXTRA_PASSWORD_QUALITY)).isFalse();
}
Aggregations