use of com.android.settings.widget.ScrollToParentEditText 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));
}
Aggregations