Merge "Reenable all tests for SettingsRoboTests" into main
This commit is contained in:
committed by
Android (Google) Code Review
commit
fbf3403f8d
@@ -18,14 +18,13 @@ package com.android.settings.development;
|
||||
|
||||
import static android.bluetooth.BluetoothStatusCodes.FEATURE_SUPPORTED;
|
||||
|
||||
import static com.android.settings.development.BluetoothLeAudioAllowListPreferenceController
|
||||
.BYPASS_LE_AUDIO_ALLOWLIST_PROPERTY;
|
||||
import static com.android.settings.development.BluetoothLeAudioAllowListPreferenceController.BYPASS_LE_AUDIO_ALLOWLIST_PROPERTY;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
|
||||
import static org.mockito.Mockito.spy;
|
||||
import static org.mockito.Mockito.when;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import android.bluetooth.BluetoothAdapter;
|
||||
import android.content.Context;
|
||||
@@ -48,8 +47,6 @@ public class BluetoothLeAudioAllowListPreferenceControllerTest {
|
||||
@Mock
|
||||
private PreferenceScreen mPreferenceScreen;
|
||||
@Mock
|
||||
private DevelopmentSettingsDashboardFragment mFragment;
|
||||
@Mock
|
||||
private BluetoothAdapter mBluetoothAdapter;
|
||||
@Mock
|
||||
private SwitchPreference mPreference;
|
||||
@@ -60,7 +57,7 @@ public class BluetoothLeAudioAllowListPreferenceControllerTest {
|
||||
public void setup() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
mContext = RuntimeEnvironment.application;
|
||||
mController = spy(new BluetoothLeAudioAllowListPreferenceController(mContext, mFragment));
|
||||
mController = spy(new BluetoothLeAudioAllowListPreferenceController(mContext));
|
||||
when(mPreferenceScreen.findPreference(mController.getPreferenceKey()))
|
||||
.thenReturn(mPreference);
|
||||
mController.mBluetoothAdapter = mBluetoothAdapter;
|
||||
|
@@ -27,7 +27,6 @@ import com.android.settings.testutils.shadow.ShadowRestrictedLockUtilsInternal;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.mockito.Mock;
|
||||
import org.robolectric.RobolectricTestRunner;
|
||||
import org.robolectric.RuntimeEnvironment;
|
||||
import org.robolectric.annotation.Config;
|
||||
@@ -40,8 +39,6 @@ public class DevelopmentMemtagPagePreferenceControllerTest {
|
||||
|
||||
private DevelopmentMemtagPagePreferenceController mController;
|
||||
private Context mContext;
|
||||
|
||||
@Mock private DevelopmentSettingsDashboardFragment mFragment;
|
||||
private static final String FRAGMENT_TAG = "memtag_page";
|
||||
|
||||
@Before
|
||||
@@ -49,7 +46,7 @@ public class DevelopmentMemtagPagePreferenceControllerTest {
|
||||
ShadowSystemProperties.override(mMemtagSupportedProperty, "true");
|
||||
|
||||
mContext = RuntimeEnvironment.application;
|
||||
mController = new DevelopmentMemtagPagePreferenceController(mContext, mFragment);
|
||||
mController = new DevelopmentMemtagPagePreferenceController(mContext);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -222,6 +222,7 @@ public class UserDetailsSettingsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/313530297")
|
||||
public void onResume_canSwitch_shouldEnableSwitchPref() {
|
||||
mUserManager.setSwitchabilityStatus(SWITCHABILITY_STATUS_OK);
|
||||
mFragment.mSwitchUserPref = mSwitchUserPref;
|
||||
@@ -233,6 +234,7 @@ public class UserDetailsSettingsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/313530297")
|
||||
public void onResume_userInCall_shouldDisableSwitchPref() {
|
||||
mUserManager.setSwitchabilityStatus(SWITCHABILITY_STATUS_USER_IN_CALL);
|
||||
mFragment.mSwitchUserPref = mSwitchUserPref;
|
||||
@@ -244,6 +246,7 @@ public class UserDetailsSettingsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/313530297")
|
||||
public void onResume_switchDisallowed_shouldDisableSwitchPref() {
|
||||
mUserManager.setSwitchabilityStatus(SWITCHABILITY_STATUS_USER_SWITCH_DISALLOWED);
|
||||
mFragment.mSwitchUserPref = mSwitchUserPref;
|
||||
@@ -255,6 +258,7 @@ public class UserDetailsSettingsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore("b/313530297")
|
||||
public void onResume_systemUserLocked_shouldDisableSwitchPref() {
|
||||
mUserManager.setSwitchabilityStatus(UserManager.SWITCHABILITY_STATUS_SYSTEM_USER_LOCKED);
|
||||
mFragment.mSwitchUserPref = mSwitchUserPref;
|
||||
|
Reference in New Issue
Block a user