Fix test string in BluetoothSwitchPreferenceControllerTest

BUG: 313014781
Test: atest SettingsRoboTests:com.android.settings.bluetooth.BluetoothSwitchPreferenceControllerTest
Change-Id: I128e4b856aa3886625d59c643c9f0b32530266ba
This commit is contained in:
Haijie Hong
2023-11-29 13:13:38 +08:00
parent aa590c2d8b
commit b61c785aa2

View File

@@ -33,7 +33,6 @@ import com.android.settings.widget.SwitchWidgetController;
import com.android.settingslib.widget.FooterPreference; import com.android.settingslib.widget.FooterPreference;
import org.junit.Before; import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.mockito.Mock; import org.mockito.Mock;
@@ -45,7 +44,7 @@ import org.robolectric.RuntimeEnvironment;
public class BluetoothSwitchPreferenceControllerTest { public class BluetoothSwitchPreferenceControllerTest {
private static final String BLUETOOTH_INFO_STRING = "When Bluetooth is turned on, your device" private static final String BLUETOOTH_INFO_STRING = "When Bluetooth is turned on, your device"
+ " can communicate with other nearby Bluetooth devices."; + " can communicate with other nearby Bluetooth devices";
@Mock @Mock
private RestrictionUtils mRestrictionUtils; private RestrictionUtils mRestrictionUtils;
@Mock @Mock
@@ -83,7 +82,6 @@ public class BluetoothSwitchPreferenceControllerTest {
assertThat(TextUtils.equals(mFooterPreference.getTitle(), text)).isTrue(); assertThat(TextUtils.equals(mFooterPreference.getTitle(), text)).isTrue();
} }
@Ignore("b/313014781")
@Test @Test
public void updateText_bluetoothOffScanningOff() { public void updateText_bluetoothOffScanningOff() {
Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.putInt(mContext.getContentResolver(),
@@ -93,7 +91,6 @@ public class BluetoothSwitchPreferenceControllerTest {
assertThat(mFooterPreference.getTitle()).isEqualTo(BLUETOOTH_INFO_STRING); assertThat(mFooterPreference.getTitle()).isEqualTo(BLUETOOTH_INFO_STRING);
} }
@Ignore("b/313014781")
@Test @Test
public void updateText_bluetoothOnScanningOff() { public void updateText_bluetoothOnScanningOff() {
Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.putInt(mContext.getContentResolver(),
@@ -103,7 +100,6 @@ public class BluetoothSwitchPreferenceControllerTest {
assertThat(mFooterPreference.getTitle()).isEqualTo(BLUETOOTH_INFO_STRING); assertThat(mFooterPreference.getTitle()).isEqualTo(BLUETOOTH_INFO_STRING);
} }
@Ignore("b/313014781")
@Test @Test
public void updateText_bluetoothOnScanningOn() { public void updateText_bluetoothOnScanningOn() {
Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.putInt(mContext.getContentResolver(),