Ignore existing failed tests and promote SettingsUnitTests to Presubmit. Exclude a few tests from Presubmit as they are failing in Presubmit but can pass locally.
Bug: 339533415 Test: atest and presubmit Change-Id: Icdc94195f3b4dda4e523d4b7498698a5ada198ea
This commit is contained in:
13
TEST_MAPPING
13
TEST_MAPPING
@@ -7,22 +7,19 @@
|
||||
"name": "SettingsUnitTests",
|
||||
"options": [
|
||||
{
|
||||
"include-filter": "com.android.settings.biometrics"
|
||||
"exclude-filter": "com.android.settings.fuelgauge.batterysaver"
|
||||
},
|
||||
{
|
||||
"include-filter": "com.android.settings.biometrics2"
|
||||
"exclude-filter": "com.android.settings.network.telephony"
|
||||
},
|
||||
{
|
||||
"include-filter": "com.android.settings.password"
|
||||
"exclude-filter": "com.android.settings.privatespace"
|
||||
},
|
||||
{
|
||||
"include-filter": "com.android.settings.privatespace"
|
||||
"exclude-filter": "com.android.settings.regionalpreferences"
|
||||
},
|
||||
{
|
||||
"include-filter": "com.android.settings.safetycenter"
|
||||
},
|
||||
{
|
||||
"include-filter": "com.android.settings.security"
|
||||
"exclude-filter": "com.android.settings.vpn2"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@@ -50,6 +50,7 @@ import com.android.settingslib.RestrictedSwitchPreference;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -188,6 +189,7 @@ public class ApprovalPreferenceControllerTest {
|
||||
|
||||
@Test
|
||||
@EnableFlags(Flags.FLAG_MODES_API)
|
||||
@Ignore("b/339550695")
|
||||
public void disable() {
|
||||
mController.disable(mCn);
|
||||
verify(mFeatureFactory.metricsFeatureProvider).action(
|
||||
|
@@ -18,7 +18,6 @@ package com.android.settings.bluetooth;
|
||||
import static org.mockito.Mockito.doNothing;
|
||||
import static org.mockito.Mockito.spy;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import android.content.Intent;
|
||||
|
||||
@@ -28,11 +27,13 @@ import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import com.android.settingslib.bluetooth.BluetoothBroadcastUtils;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@Ignore("b/337418017")
|
||||
public class QrCodeScanModeActivityTest {
|
||||
|
||||
@Mock
|
||||
|
@@ -32,12 +32,14 @@ import com.android.settings.Utils;
|
||||
import com.android.settings.testutils.ResourcesUtils;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@Ignore("b/337417918")
|
||||
public class CommunalPreferenceControllerTest {
|
||||
@Mock
|
||||
private UserManager mUserManager;
|
||||
|
@@ -34,6 +34,7 @@ import org.junit.runner.RunWith
|
||||
import org.mockito.Mockito.mock
|
||||
import org.mockito.Mockito.spy
|
||||
import java.util.concurrent.Executor
|
||||
import org.junit.Ignore
|
||||
|
||||
/** Unit tests for [ThreadNetworkFragmentController]. */
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@@ -99,6 +100,7 @@ class ThreadNetworkFragmentControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/339767488")
|
||||
fun getSummary_ThreadIsDisabled_returnsOff() {
|
||||
startController(controller)
|
||||
fakeThreadNetworkController.setEnabled(false, executor) {}
|
||||
|
@@ -35,6 +35,7 @@ import org.junit.runner.RunWith
|
||||
import org.mockito.Mockito.mock
|
||||
import org.mockito.Mockito.spy
|
||||
import java.util.concurrent.Executor
|
||||
import org.junit.Ignore
|
||||
|
||||
/** Unit tests for [ThreadNetworkToggleController]. */
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
@@ -89,6 +90,7 @@ class ThreadNetworkToggleControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/339767488")
|
||||
fun isChecked_threadSetEnabled_returnsTrue() {
|
||||
fakeThreadNetworkController.setEnabled(true, executor) { }
|
||||
startController(controller)
|
||||
@@ -114,6 +116,7 @@ class ThreadNetworkToggleControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/339767488")
|
||||
fun setChecked_setUnchecked_threadIsDisabled() {
|
||||
startController(controller)
|
||||
|
||||
|
@@ -28,12 +28,14 @@ import androidx.test.core.app.ApplicationProvider;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@Ignore("b/337417779")
|
||||
public class CellDataPreferenceTest {
|
||||
|
||||
@Mock
|
||||
|
@@ -37,12 +37,14 @@ import androidx.test.core.app.ApplicationProvider;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@Ignore("b/339148064")
|
||||
public class BluetoothStackLogPreferenceControllerTest {
|
||||
private static final String TAG = "BluetoothStackLogPreferenceControllerTest";
|
||||
|
||||
|
@@ -217,6 +217,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/337417520")
|
||||
public void initialize_updateServiceStateWithPowerOff_shouldUpdateTextAndResetSignalStrength() {
|
||||
when(mServiceState.getState()).thenReturn(ServiceState.STATE_POWER_OFF);
|
||||
|
||||
@@ -229,6 +230,7 @@ public class SimStatusDialogControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/337417520")
|
||||
public void initialize_updateVoiceDataOutOfService_shouldUpdateSettingAndResetSignalStrength() {
|
||||
when(mServiceState.getState()).thenReturn(ServiceState.STATE_OUT_OF_SERVICE);
|
||||
when(mServiceState.getDataRegistrationState()).thenReturn(
|
||||
|
@@ -46,6 +46,7 @@ import com.android.settings.R;
|
||||
import com.android.settingslib.applications.StorageStatsSource;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@@ -172,6 +173,7 @@ public class StorageAsyncLoaderTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/337417819")
|
||||
public void testRemovedPackageDoesNotCrash() throws Exception {
|
||||
ApplicationInfo info = new ApplicationInfo();
|
||||
info.packageName = PACKAGE_NAME_1;
|
||||
|
@@ -30,6 +30,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -49,6 +50,7 @@ public class ScreenResolutionControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/337417619")
|
||||
public void getAvailabilityStatus_hasFhdAndQhdModes_returnAvailable() {
|
||||
Display.Mode modeA = new Display.Mode(0, mHighWidth, 0, 0);
|
||||
Display.Mode modeB = new Display.Mode(0, mFullWidth, 0, 0);
|
||||
@@ -76,6 +78,7 @@ public class ScreenResolutionControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/337417619")
|
||||
public void updateState_FullResolution_shouldSetSummaryToFullResolution() {
|
||||
int width = mFullWidth;
|
||||
doReturn(width).when(mController).getDisplayWidth();
|
||||
|
@@ -24,6 +24,7 @@ import android.text.format.DateUtils;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -32,6 +33,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@Ignore("b/337418011")
|
||||
public class AppInfoTest {
|
||||
|
||||
private static final String PACKAGE_NAME = "com.android.app";
|
||||
|
@@ -24,6 +24,7 @@ import com.android.settings.homepage.contextualcards.ContextualCardLookupTable.C
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
@@ -31,6 +32,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@Ignore("b/337417898")
|
||||
public class ContextualCardLookupTableTest {
|
||||
|
||||
private static final int UNSUPPORTED_CARD_TYPE = -99999;
|
||||
|
@@ -34,6 +34,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.android.settings.widget.TickButtonPreference;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
@@ -92,6 +93,7 @@ public class TermsOfAddressFeminineControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/339543490")
|
||||
public void displayPreference_setGrammaticalGenderIsFeminine_FeminineIsSelected() {
|
||||
TickButtonPreference selectedPreference =
|
||||
(TickButtonPreference) mPreferenceScreen.getPreference(2);
|
||||
|
@@ -34,6 +34,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.android.settings.widget.TickButtonPreference;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
@@ -92,6 +93,7 @@ public class TermsOfAddressMasculineControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/339543490")
|
||||
public void displayPreference_setGrammaticalGenderIsMasculine_MasculineIsSelected() {
|
||||
TickButtonPreference selectedPreference =
|
||||
(TickButtonPreference) mPreferenceScreen.getPreference(3);
|
||||
|
@@ -34,6 +34,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.android.settings.widget.TickButtonPreference;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
@@ -92,6 +93,7 @@ public class TermsOfAddressNeutralControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/339543490")
|
||||
public void displayPreference_setGrammaticalGenderIsNotSpecified_NeutralIsSelected() {
|
||||
TickButtonPreference selectedPreference =
|
||||
(TickButtonPreference) mPreferenceScreen.getPreference(4);
|
||||
|
@@ -34,6 +34,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.android.settings.widget.TickButtonPreference;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
@@ -92,6 +93,7 @@ public class TermsOfAddressNotSpecifiedControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/339543490")
|
||||
public void displayPreference_setGrammaticalGenderIsNotSpecified_NotSpecifiedIsSelected() {
|
||||
TickButtonPreference selectedPreference =
|
||||
(TickButtonPreference) mPreferenceScreen.getPreference(1);
|
||||
|
@@ -572,6 +572,7 @@ public class SubscriptionUtilTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/339149463")
|
||||
public void isSimHardwareVisible_configAsVisible_returnTrue() {
|
||||
when(mResources.getBoolean(R.bool.config_show_sim_info))
|
||||
.thenReturn(true);
|
||||
|
@@ -41,6 +41,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@@ -753,6 +754,7 @@ public class UiccSlotUtilTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/337417975")
|
||||
public void onReceiveSimCardStateChangeReceiver_receiveAction_timerCountDown() {
|
||||
CountDownLatch latch = spy(new CountDownLatch(1));
|
||||
UiccSlotUtil.SimCardStateChangeReceiver receive =
|
||||
|
@@ -25,6 +25,7 @@ import com.android.internal.telephony.OperatorInfo
|
||||
import com.android.settings.network.telephony.CellInfoUtil.getNetworkTitle
|
||||
import com.android.settings.network.telephony.CellInfoUtil.getOperatorNumeric
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import org.junit.Ignore
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
@@ -96,6 +97,7 @@ class CellInfoUtilTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/337417936")
|
||||
fun convertOperatorInfoToCellInfo() {
|
||||
val operatorInfo = OperatorInfo(LONG, SHORT, "12301")
|
||||
|
||||
@@ -108,6 +110,7 @@ class CellInfoUtilTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/337417222")
|
||||
fun cellInfoListToString() {
|
||||
val cellInfoList =
|
||||
listOf(
|
||||
|
@@ -60,6 +60,7 @@ import com.android.settings.network.telephony.TelephonyConstants.TelephonyManage
|
||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@@ -346,6 +347,7 @@ public class EnabledNetworkModePreferenceControllerTest {
|
||||
|
||||
@UiThreadTest
|
||||
@Test
|
||||
@Ignore("b/337418033")
|
||||
public void updateState_updateByNetworkMode() {
|
||||
mockEnabledNetworkMode(TelephonyManagerConstants.NETWORK_MODE_TDSCDMA_GSM_WCDMA);
|
||||
|
||||
@@ -377,6 +379,7 @@ public class EnabledNetworkModePreferenceControllerTest {
|
||||
|
||||
@UiThreadTest
|
||||
@Test
|
||||
@Ignore("b/337418033")
|
||||
public void onPreferenceChange_updateSuccess() {
|
||||
mockEnabledNetworkMode(TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA);
|
||||
doReturn(true).when(mTelephonyManager).setPreferredNetworkTypeBitmask(
|
||||
@@ -393,6 +396,7 @@ public class EnabledNetworkModePreferenceControllerTest {
|
||||
|
||||
@UiThreadTest
|
||||
@Test
|
||||
@Ignore("b/337418033")
|
||||
public void onPreferenceChange_updateFail() {
|
||||
mockEnabledNetworkMode(TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA);
|
||||
doReturn(false).when(mTelephonyManager).setPreferredNetworkTypeBitmask(
|
||||
@@ -408,6 +412,7 @@ public class EnabledNetworkModePreferenceControllerTest {
|
||||
|
||||
@UiThreadTest
|
||||
@Test
|
||||
@Ignore("b/337418033")
|
||||
public void preferredNetworkModeNotification_preferenceUpdates() {
|
||||
|
||||
final PreferenceManager preferenceManager = new PreferenceManager(mContext);
|
||||
|
@@ -48,6 +48,7 @@ import com.android.settings.network.ims.MockWfcQueryImsState;
|
||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
@@ -176,6 +177,7 @@ public class NetworkProviderWifiCallingGroupTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/337417499")
|
||||
public void
|
||||
shouldShowWifiCallingForSub_wifiCallingEnabledWithActivityHandleIntent_returnTrue() {
|
||||
buildPhoneAccountConfigureIntent(true);
|
||||
|
@@ -38,6 +38,7 @@ import com.android.settings.network.CarrierConfigCache;
|
||||
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;
|
||||
@@ -180,6 +181,7 @@ public class NrAdvancedCallingPreferenceControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/339542743")
|
||||
public void updateState_configOn_prefChecked() {
|
||||
doReturn(TelephonyManager.ENABLE_VONR_SUCCESS).when(
|
||||
mTelephonyManager).setVoNrEnabled(anyBoolean());
|
||||
|
@@ -38,6 +38,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
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;
|
||||
@@ -99,6 +100,7 @@ public class CdmaSystemSelectPreferenceControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/337417544")
|
||||
public void updateState_stateHome_displayHome() {
|
||||
doReturn(TelephonyManager.CDMA_ROAMING_MODE_HOME).when(
|
||||
mTelephonyManager).getCdmaRoamingMode();
|
||||
@@ -110,6 +112,7 @@ public class CdmaSystemSelectPreferenceControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/337417897")
|
||||
public void updateState_LteGSMWcdma_disabled() {
|
||||
doReturn(TelephonyManager.CDMA_ROAMING_MODE_HOME).when(
|
||||
mTelephonyManager).getCdmaRoamingMode();
|
||||
@@ -123,6 +126,7 @@ public class CdmaSystemSelectPreferenceControllerTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/337417917")
|
||||
public void updateState_stateOther_resetToDefault() {
|
||||
Settings.Global.putInt(mContext.getContentResolver(),
|
||||
Settings.Global.CDMA_ROAMING_MODE,
|
||||
|
@@ -36,6 +36,7 @@ import com.android.settings.SettingsActivity;
|
||||
import com.android.settings.safetycenter.SafetyCenterManagerWrapper;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
@@ -58,6 +59,7 @@ public class PrivacyDashboardActivityTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/339544085")
|
||||
public void onCreate_whenSafetyCenterEnabled_redirectsToSafetyCenter() throws Exception {
|
||||
startActivityUsingIntent(android.provider.Settings.ACTION_PRIVACY_SETTINGS);
|
||||
when(mSafetyCenterManagerWrapper.isEnabled(any(Context.class))).thenReturn(true);
|
||||
|
Reference in New Issue
Block a user