use of com.google.android.setupcompat.PartnerCustomizationLayout in project android_packages_apps_Settings by omnirom.
the class FingerprintSuggestionActivityTest method testKeyguardSecure_shouldFinishWithFingerprintResultSkip.
@Test
public void testKeyguardSecure_shouldFinishWithFingerprintResultSkip() {
getShadowKeyguardManager().setIsKeyguardSecure(true);
mController.create().resume();
PartnerCustomizationLayout layout = mActivity.findViewById(R.id.setup_wizard_layout);
final Button cancelButton = layout.getMixin(FooterBarMixin.class).getSecondaryButtonView();
assertThat(cancelButton.getText().toString()).isEqualTo("Cancel");
assertWithMessage("Cancel visible").that(cancelButton.getVisibility()).isEqualTo(View.VISIBLE);
cancelButton.performClick();
ShadowActivity shadowActivity = Shadows.shadowOf(mActivity);
assertWithMessage("Is finishing").that(mActivity.isFinishing()).isTrue();
assertWithMessage("Result code").that(shadowActivity.getResultCode()).isEqualTo(Activity.RESULT_CANCELED);
}
use of com.google.android.setupcompat.PartnerCustomizationLayout in project android_packages_apps_Settings by omnirom.
the class SetupChooseLockPasswordTest method createActivity_skipButtonInIntroductionStage_shouldBeVisible.
@Test
public void createActivity_skipButtonInIntroductionStage_shouldBeVisible() {
SetupChooseLockPassword activity = createSetupChooseLockPassword();
final InputMethodManager inputMethodManager = activity.getSystemService(InputMethodManager.class);
final ShadowInputMethodManager shadowImm = Shadows.shadowOf(inputMethodManager);
final PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
final Button skipOrClearButton = layout.getMixin(FooterBarMixin.class).getSecondaryButtonView();
assertThat(skipOrClearButton).isNotNull();
assertThat(skipOrClearButton.getVisibility()).isEqualTo(View.VISIBLE);
skipOrClearButton.performClick();
final AlertDialog chooserDialog = ShadowAlertDialogCompat.getLatestAlertDialog();
assertThat(chooserDialog).isNotNull();
assertThat(shadowImm.isSoftInputVisible()).isFalse();
}
use of com.google.android.setupcompat.PartnerCustomizationLayout in project android_packages_apps_Settings by omnirom.
the class SetupChooseLockPatternTest method clearButton_shouldBeVisible_duringRetryStage.
@Test
public void clearButton_shouldBeVisible_duringRetryStage() {
enterPattern();
PartnerCustomizationLayout layout = mActivity.findViewById(R.id.setup_wizard_layout);
final Button skipOrClearButton = layout.getMixin(FooterBarMixin.class).getSecondaryButtonView();
assertThat(skipOrClearButton.getVisibility()).isEqualTo(View.VISIBLE);
assertThat(skipOrClearButton.isEnabled()).isTrue();
skipOrClearButton.performClick();
assertThat(findFragment(mActivity).mChosenPattern).isNull();
}
use of com.google.android.setupcompat.PartnerCustomizationLayout in project android_packages_apps_Settings by omnirom.
the class SetupChooseLockPatternTest method skipButton_shouldBeVisible_duringNonFingerprintFlow.
@Test
public void skipButton_shouldBeVisible_duringNonFingerprintFlow() {
PartnerCustomizationLayout layout = mActivity.findViewById(R.id.setup_wizard_layout);
final Button skipOrClearButton = layout.getMixin(FooterBarMixin.class).getSecondaryButtonView();
assertThat(skipOrClearButton).isNotNull();
assertThat(skipOrClearButton.getVisibility()).isEqualTo(View.VISIBLE);
skipOrClearButton.performClick();
AlertDialog chooserDialog = ShadowAlertDialogCompat.getLatestAlertDialog();
assertThat(chooserDialog).isNotNull();
}
use of com.google.android.setupcompat.PartnerCustomizationLayout in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SetupChooseLockPasswordTest method createActivity_skipButtonInIntroductionStage_shouldBeVisible.
@Test
public void createActivity_skipButtonInIntroductionStage_shouldBeVisible() {
SetupChooseLockPassword activity = createSetupChooseLockPassword();
final PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
final Button skipOrClearButton = layout.getMixin(FooterBarMixin.class).getSecondaryButtonView();
assertThat(skipOrClearButton).isNotNull();
assertThat(skipOrClearButton.getVisibility()).isEqualTo(View.VISIBLE);
skipOrClearButton.performClick();
final AlertDialog chooserDialog = ShadowAlertDialogCompat.getLatestAlertDialog();
assertThat(chooserDialog).isNotNull();
}
Aggregations