use of android.platform.test.annotations.Presubmit in project android_packages_apps_Settings by omnirom.
the class SettingsSearchIndexablesProviderTest method nonIndexableKeys_shouldNotCrash.
/**
* All {@link Indexable.SearchIndexProvider} should collect a list of non-indexable keys
* without crashing. This test enables crashing of individual providers in the indexing pipeline
* and checks that there are no crashes.
*/
@Test
@Presubmit
public void nonIndexableKeys_shouldNotCrash() {
// Allow crashes in the indexing pipeline.
System.setProperty(SettingsSearchIndexablesProvider.SYSPROP_CRASH_ON_ERROR, "enabled");
final Uri uri = Uri.parse("content://" + mContext.getPackageName() + "/" + SearchIndexablesContract.NON_INDEXABLES_KEYS_PATH);
mContext.getContentResolver().query(uri, null, null, null, null);
}
use of android.platform.test.annotations.Presubmit in project android_packages_apps_Settings by omnirom.
the class HomepageDisplayTests method testHomepageCategory.
@Presubmit
@Test
public void testHomepageCategory() throws Exception {
// Launch Settings
SettingsHelper.launchSettingsPage(InstrumentationRegistry.getContext(), Settings.ACTION_SETTINGS);
// Scroll to top
final UiObject2 view = mDevice.wait(Until.findObject(By.res(SETTINGS_PACKAGE, "main_content")), TIMEOUT);
view.scroll(Direction.UP, 100f);
// Inspect each item
for (String item : HOMEPAGE_ITEMS) {
SettingsTestUtils.assertTitleMatch(mDevice, item);
}
}
Aggregations