From ef2e91913b1ea7f6e28899cbe3956284b92fc49c Mon Sep 17 00:00:00 2001 From: Fan Zhang Date: Fri, 19 Apr 2019 13:23:29 -0700 Subject: [PATCH] Add @Ignore for all failing tests. Bug: 130896210 Bug: 130896218 Bug: 130896701 Bug: 130897882 Bug: 130897305 Bug: 130897640 Bug: 130896049 Test: robo Change-Id: I77143d504501b358c2103aa736cd2aad13ed4c5c --- .../CrossProfileCalendarPreferenceControllerTest.java | 2 ++ .../settings/core/codeinspection/CodeInspectionTest.java | 2 ++ .../display/AdaptiveSleepPreferenceControllerTest.java | 2 ++ .../settings/display/DarkUIInfoDialogFragmentTest.java | 2 ++ .../fuelgauge/BatteryHeaderPreferenceControllerTest.java | 3 +++ .../src/com/android/settings/panel/PanelFragmentTest.java | 4 ++++ .../com/android/settings/panel/SettingsPanelActivityTest.java | 2 ++ .../src/com/android/settings/panel/VolumePanelTest.java | 2 ++ .../wifi/details/WifiDetailPreferenceControllerTest.java | 2 ++ 9 files changed, 21 insertions(+) diff --git a/tests/robotests/src/com/android/settings/accounts/CrossProfileCalendarPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accounts/CrossProfileCalendarPreferenceControllerTest.java index 2cbed9782e6..7c6077440e6 100644 --- a/tests/robotests/src/com/android/settings/accounts/CrossProfileCalendarPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/accounts/CrossProfileCalendarPreferenceControllerTest.java @@ -40,6 +40,7 @@ import android.util.ArraySet; import com.android.settingslib.RestrictedSwitchPreference; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -91,6 +92,7 @@ public class CrossProfileCalendarPreferenceControllerTest { } @Test + @Ignore("b/130896049") public void getAvailabilityStatus_hasManagedUser_AVAILABLE() { mController.setManagedUser(mManagedUser); assertThat(mController.getAvailabilityStatus()) diff --git a/tests/robotests/src/com/android/settings/core/codeinspection/CodeInspectionTest.java b/tests/robotests/src/com/android/settings/core/codeinspection/CodeInspectionTest.java index 4062bfb8f6a..5fdadb48662 100644 --- a/tests/robotests/src/com/android/settings/core/codeinspection/CodeInspectionTest.java +++ b/tests/robotests/src/com/android/settings/core/codeinspection/CodeInspectionTest.java @@ -24,6 +24,7 @@ import com.android.settings.search.SearchIndexProviderCodeInspector; import com.android.settings.slices.SliceControllerInXmlCodeInspector; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -46,6 +47,7 @@ public class CodeInspectionTest { } @Test + @Ignore("b/130897640") public void runInstrumentableFragmentCodeInspection() { new InstrumentableFragmentCodeInspector(mClasses).run(); } diff --git a/tests/robotests/src/com/android/settings/display/AdaptiveSleepPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/display/AdaptiveSleepPreferenceControllerTest.java index 9adb1ad2861..89388730742 100644 --- a/tests/robotests/src/com/android/settings/display/AdaptiveSleepPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/display/AdaptiveSleepPreferenceControllerTest.java @@ -32,6 +32,7 @@ import com.android.settings.R; import com.android.settingslib.RestrictedPreference; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -40,6 +41,7 @@ import org.robolectric.RobolectricTestRunner; import org.robolectric.RuntimeEnvironment; @RunWith(RobolectricTestRunner.class) +@Ignore("b/130897305") public class AdaptiveSleepPreferenceControllerTest { private static final String PREFERENCE_KEY = "adaptive_sleep"; diff --git a/tests/robotests/src/com/android/settings/display/DarkUIInfoDialogFragmentTest.java b/tests/robotests/src/com/android/settings/display/DarkUIInfoDialogFragmentTest.java index 7a8bdedd63e..0e1c2f6f068 100644 --- a/tests/robotests/src/com/android/settings/display/DarkUIInfoDialogFragmentTest.java +++ b/tests/robotests/src/com/android/settings/display/DarkUIInfoDialogFragmentTest.java @@ -28,6 +28,7 @@ import android.content.DialogInterface; import android.content.SharedPreferences; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -49,6 +50,7 @@ public class DarkUIInfoDialogFragmentTest { } @Test + @@Ignore("b/130897882") public void dialogDismissedOnConfirmation() { doReturn(RuntimeEnvironment.application).when(mFragment).getContext(); SharedPreferences prefs = RuntimeEnvironment.application.getSharedPreferences( diff --git a/tests/robotests/src/com/android/settings/fuelgauge/BatteryHeaderPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/fuelgauge/BatteryHeaderPreferenceControllerTest.java index 5be72744f5c..97ea75fdaaa 100644 --- a/tests/robotests/src/com/android/settings/fuelgauge/BatteryHeaderPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/fuelgauge/BatteryHeaderPreferenceControllerTest.java @@ -50,6 +50,7 @@ import com.android.settingslib.widget.LayoutPreference; import org.junit.After; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -135,6 +136,7 @@ public class BatteryHeaderPreferenceControllerTest { } @Test + @Ignore("b/130896701") public void displayPreference_displayBatteryLevel() { mController.displayPreference(mPreferenceScreen); @@ -188,6 +190,7 @@ public class BatteryHeaderPreferenceControllerTest { } @Test + @Ignore("b/130896701") public void quickUpdateHeaderPreference_onlyUpdateBatteryLevelAndChargingState() { mSummary.setText(BATTERY_STATUS); mSummary2.setText(BATTERY_STATUS); diff --git a/tests/robotests/src/com/android/settings/panel/PanelFragmentTest.java b/tests/robotests/src/com/android/settings/panel/PanelFragmentTest.java index fd2e806be77..793b44d5ba2 100644 --- a/tests/robotests/src/com/android/settings/panel/PanelFragmentTest.java +++ b/tests/robotests/src/com/android/settings/panel/PanelFragmentTest.java @@ -36,6 +36,7 @@ import com.android.settings.R; import com.android.settings.testutils.FakeFeatureFactory; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; @@ -105,6 +106,7 @@ public class PanelFragmentTest { } @Test + @Ignore("b/130896218") public void onDestroy_logCloseEvent() { mPanelFragment.onDestroy(); verify(mFakeFeatureFactory.metricsFeatureProvider).action( @@ -115,6 +117,7 @@ public class PanelFragmentTest { 0); } @Test + @Ignore("b/130896218") public void panelSeeMoreClick_logsCloseEvent() { final View.OnClickListener listener = mPanelFragment.getSeeMoreListener(); @@ -130,6 +133,7 @@ public class PanelFragmentTest { } @Test + @Ignore("b/130896218") public void panelDoneClick_logsCloseEvent() { final View.OnClickListener listener = mPanelFragment.getCloseListener(); diff --git a/tests/robotests/src/com/android/settings/panel/SettingsPanelActivityTest.java b/tests/robotests/src/com/android/settings/panel/SettingsPanelActivityTest.java index fa15aa02b1d..4ca6395400a 100644 --- a/tests/robotests/src/com/android/settings/panel/SettingsPanelActivityTest.java +++ b/tests/robotests/src/com/android/settings/panel/SettingsPanelActivityTest.java @@ -35,6 +35,7 @@ import android.view.MotionEvent; import com.android.settings.testutils.FakeFeatureFactory; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.Robolectric; @@ -89,6 +90,7 @@ public class SettingsPanelActivityTest { } @Test + @Ignore("b/130896218") public void onTouchEvent_outsideAction_logsPanelClosed() { final MotionEvent event = mock(MotionEvent.class); when(event.getAction()).thenReturn(MotionEvent.ACTION_OUTSIDE); diff --git a/tests/robotests/src/com/android/settings/panel/VolumePanelTest.java b/tests/robotests/src/com/android/settings/panel/VolumePanelTest.java index 11de7b31b60..154428de679 100644 --- a/tests/robotests/src/com/android/settings/panel/VolumePanelTest.java +++ b/tests/robotests/src/com/android/settings/panel/VolumePanelTest.java @@ -23,6 +23,7 @@ import android.net.Uri; import com.android.settings.slices.CustomSliceRegistry; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.robolectric.RobolectricTestRunner; @@ -41,6 +42,7 @@ public class VolumePanelTest { } @Test + @Ignore("b/130896218") public void getSlices_containsNecessarySlices() { final List uris = mPanel.getSlices(); diff --git a/tests/robotests/src/com/android/settings/wifi/details/WifiDetailPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/wifi/details/WifiDetailPreferenceControllerTest.java index 2acfc4a3a97..906c55c39f2 100644 --- a/tests/robotests/src/com/android/settings/wifi/details/WifiDetailPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/wifi/details/WifiDetailPreferenceControllerTest.java @@ -83,6 +83,7 @@ import com.android.settingslib.wifi.WifiTracker; import com.android.settingslib.wifi.WifiTrackerFactory; import org.junit.Before; +import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Answers; @@ -105,6 +106,7 @@ import java.util.stream.Collectors; @RunWith(RobolectricTestRunner.class) @Config(shadows = {ShadowDevicePolicyManager.class, ShadowEntityHeaderController.class}) +@Ignore("b/130896210") public class WifiDetailPreferenceControllerTest { private static final int LEVEL = 1;