Clean up instrumentation tests
- Fixed some important tests - Deleted some useless tests - Some tests are still broken, filed bugs for these Fixes: 124572765 Test: atest Change-Id: Iac4e6a1fb1dbf9383d91945525df69a651ae77fd
This commit is contained in:
@@ -18,13 +18,9 @@ package com.android.settings.dashboard;
|
||||
|
||||
import static androidx.test.espresso.Espresso.onView;
|
||||
import static androidx.test.espresso.assertion.ViewAssertions.doesNotExist;
|
||||
import static androidx.test.espresso.assertion.ViewAssertions.matches;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.withEffectiveVisibility;
|
||||
import static androidx.test.espresso.matcher.ViewMatchers.withId;
|
||||
|
||||
import static com.android.settings.dashboard.FirstIdViewMatcher.withFirstId;
|
||||
|
||||
import static org.hamcrest.Matchers.allOf;
|
||||
|
||||
import android.app.Instrumentation;
|
||||
@@ -57,12 +53,6 @@ public class PreferenceThemeTest {
|
||||
mTargetPackage = mTargetContext.getPackageName();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void startPhoneStatus_preferenceIconSpaceReserved() throws InterruptedException {
|
||||
launchPhoneStatus();
|
||||
onView(withFirstId(R.id.icon_frame)).check(matches(isDisplayed()));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void startSetupWizardLockScreen_preferenceIconSpaceNotReserved() {
|
||||
launchSetupWizardLockScreen();
|
||||
@@ -72,14 +62,6 @@ public class PreferenceThemeTest {
|
||||
onView(withId(R.id.icon_container)).check(doesNotExist());
|
||||
}
|
||||
|
||||
private void launchPhoneStatus() {
|
||||
final Intent settingsIntent = new Intent("android.settings.DEVICE_INFO_SETTINGS")
|
||||
.addCategory(Intent.CATEGORY_DEFAULT)
|
||||
.setPackage(mTargetPackage)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
InstrumentationRegistry.getInstrumentation().startActivitySync(settingsIntent);
|
||||
}
|
||||
|
||||
private void launchSetupWizardLockScreen() {
|
||||
final Intent settingsIntent = new Intent("com.android.settings.SETUP_LOCK_SCREEN")
|
||||
.addCategory(Intent.CATEGORY_DEFAULT)
|
||||
|
Reference in New Issue
Block a user