use of org.robolectric.shadows.ShadowInputMethodManager 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 org.robolectric.shadows.ShadowInputMethodManager in project android_packages_apps_Settings by omnirom.
the class WifiConfigControllerTest method checkImeStatus_whenAdvancedToggled_shouldBeHide.
@Test
public void checkImeStatus_whenAdvancedToggled_shouldBeHide() {
final InputMethodManager inputMethodManager = mContext.getSystemService(InputMethodManager.class);
final ShadowInputMethodManager shadowImm = Shadows.shadowOf(inputMethodManager);
final CheckBox advButton = mView.findViewById(R.id.wifi_advanced_togglebox);
inputMethodManager.showSoftInput(null, /* view */
0);
advButton.performClick();
assertThat(shadowImm.isSoftInputVisible()).isFalse();
}
use of org.robolectric.shadows.ShadowInputMethodManager in project android_packages_apps_Settings by omnirom.
the class WifiConfigController2Test method checkImeStatus_whenAdvancedToggled_shouldBeHide.
@Test
public void checkImeStatus_whenAdvancedToggled_shouldBeHide() {
final InputMethodManager inputMethodManager = mContext.getSystemService(InputMethodManager.class);
final ShadowInputMethodManager shadowImm = Shadows.shadowOf(inputMethodManager);
final CheckBox advButton = mView.findViewById(R.id.wifi_advanced_togglebox);
inputMethodManager.showSoftInput(null, /* view */
0);
advButton.performClick();
assertThat(shadowImm.isSoftInputVisible()).isFalse();
}
Aggregations