use of com.google.android.setupcompat.PartnerCustomizationLayout in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SetupChooseLockPasswordTest method createActivity_inputPasswordInConfirmStage_clearButtonShouldBeShown.
@Test
public void createActivity_inputPasswordInConfirmStage_clearButtonShouldBeShown() {
SetupChooseLockPassword activity = createSetupChooseLockPassword();
SetupChooseLockPasswordFragment fragment = (SetupChooseLockPasswordFragment) activity.getSupportFragmentManager().findFragmentById(R.id.main_content);
ScrollToParentEditText passwordEntry = activity.findViewById(R.id.password_entry);
passwordEntry.setText("");
fragment.updateStage(Stage.NeedToConfirm);
final PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
final Button skipOrClearButton = layout.getMixin(FooterBarMixin.class).getSecondaryButtonView();
assertThat(skipOrClearButton.isEnabled()).isTrue();
assertThat(skipOrClearButton.getVisibility()).isEqualTo(View.GONE);
passwordEntry.setText("1234");
fragment.updateUi();
assertThat(skipOrClearButton.getVisibility()).isEqualTo(View.VISIBLE);
assertThat(skipOrClearButton.getText()).isEqualTo(application.getString(R.string.lockpassword_clear_label));
}
use of com.google.android.setupcompat.PartnerCustomizationLayout in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class FingerprintEnrollFinishTest method clickAddAnother_shouldPropagateResults.
@Test
public void clickAddAnother_shouldPropagateResults() {
final ComponentName enrollingComponent = new ComponentName(getTargetContext(), FingerprintEnrollEnrolling.class);
intending(hasComponent(enrollingComponent)).respondWith(new ActivityResult(Activity.RESULT_OK, null));
PartnerCustomizationLayout layout = mActivityRule.getActivity().findViewById(R.id.setup_wizard_layout);
layout.getMixin(FooterBarMixin.class).getPrimaryButtonView().performClick();
intended(hasComponent(enrollingComponent));
assertTrue(mActivityRule.getActivity().isFinishing());
}
use of com.google.android.setupcompat.PartnerCustomizationLayout in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class ChooseLockPasswordTest method clearIsNotShown_when_activityLaunchedInitially.
@Test
public void clearIsNotShown_when_activityLaunchedInitially() {
final Activity activity = mInstrumentation.startActivitySync(new Intent(mContext, ChooseLockPassword.class).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
final PartnerCustomizationLayout layout = activity.findViewById(R.id.setup_wizard_layout);
assertThat(layout.getMixin(FooterBarMixin.class).getSecondaryButtonView().getVisibility()).isEqualTo(View.GONE);
}
use of com.google.android.setupcompat.PartnerCustomizationLayout in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class FingerprintEnrollFinishTest method clickAddAnother_shouldLaunchEnrolling.
@Test
public void clickAddAnother_shouldLaunchEnrolling() {
final ComponentName enrollingComponent = new ComponentName(getTargetContext(), FingerprintEnrollEnrolling.class);
intending(hasComponent(enrollingComponent)).respondWith(new ActivityResult(Activity.RESULT_CANCELED, null));
PartnerCustomizationLayout layout = mActivityRule.getActivity().findViewById(R.id.setup_wizard_layout);
layout.getMixin(FooterBarMixin.class).getPrimaryButtonView().performClick();
intended(hasComponent(enrollingComponent));
assertFalse(mActivityRule.getActivity().isFinishing());
}
use of com.google.android.setupcompat.PartnerCustomizationLayout in project Resurrection_packages_apps_Settings by ResurrectionRemix.
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));
}
Aggregations