use of android.support.test.uiautomator.UiSelector in project android_packages_apps_Settings by crdroidandroid.
the class UserSettingsTest method testEmergencyInfoNotExists.
@Test
public void testEmergencyInfoNotExists() throws Exception {
launchUserSettings();
UiObject emergencyInfoPreference = mDevice.findObject(new UiSelector().text(EMERGNENCY_INFO));
assertFalse(emergencyInfoPreference.exists());
}
use of android.support.test.uiautomator.UiSelector in project android_packages_apps_Settings by crdroidandroid.
the class UserSettingsTest method testAddUsersWhenLockedNotExists.
@Test
public void testAddUsersWhenLockedNotExists() throws Exception {
launchUserSettings();
UiObject addUsersPreference = mDevice.findObject(new UiSelector().text(ADD_USERS_WHEN_LOCKED));
assertFalse(addUsersPreference.exists());
}
use of android.support.test.uiautomator.UiSelector in project android_packages_apps_Settings by crdroidandroid.
the class UserSettingsTest method launchUserSettings.
private void launchUserSettings() throws Exception {
launchSettings();
final UiScrollable settings = new UiScrollable(new UiSelector().packageName(mTargetPackage).scrollable(true));
final String titleUsersAndAccounts = USER_AND_ACCOUNTS;
settings.scrollTextIntoView(titleUsersAndAccounts);
mDevice.findObject(new UiSelector().text(titleUsersAndAccounts)).click();
mDevice.findObject(new UiSelector().text(USERS)).click();
}
use of android.support.test.uiautomator.UiSelector in project platform_packages_apps_Settings by BlissRoms.
the class DefaultAppSettingsTest method launchDefaultApps.
private void launchDefaultApps() throws Exception {
final Intent settingsIntent = new Intent(Intent.ACTION_MAIN).addCategory(Intent.CATEGORY_LAUNCHER).setPackage(mTargetPackage).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getInstrumentation().getContext().startActivity(settingsIntent);
final String titleApps = mTargetContext.getResources().getString(R.string.app_and_notification_dashboard_title);
mDevice.findObject(new UiSelector().text(titleApps)).click();
final String titleDefaultApps = mTargetContext.getResources().getString(R.string.app_default_dashboard_title);
mDevice.findObject(new UiSelector().text(titleDefaultApps)).click();
}
use of android.support.test.uiautomator.UiSelector in project platform_packages_apps_Settings by BlissRoms.
the class UserSettingsTest method testAddUsersWhenLockedNotExists.
@Test
public void testAddUsersWhenLockedNotExists() throws Exception {
launchUserSettings();
UiObject addUsersPreference = mDevice.findObject(new UiSelector().text(ADD_USERS_WHEN_LOCKED));
assertFalse(addUsersPreference.exists());
}
Aggregations