Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b17f301 authored by Fan Wu's avatar Fan Wu Committed by Android (Google) Code Review
Browse files

Merge "Ignore failing tests under connecteddevice/" into main

parents b347d32b 11ecd1f6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import com.android.settings.testutils.shadow.ShadowConnectivityManager;
import com.android.settings.testutils.shadow.ShadowUserManager;

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 ConnectedDeviceDashboardFragmentTest {
        assertThat(indexRes.get(0).xmlResId).isEqualTo(R.xml.connected_devices);
    }

    @Ignore("b/313362757")
    @Test
    public void nonIndexableKeys_existInXmlLayout() {
        final List<String> niks = ConnectedDeviceDashboardFragment.SEARCH_INDEX_DATA_PROVIDER
+2 −0
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ import com.android.settingslib.core.lifecycle.Lifecycle;
import com.android.settingslib.widget.SelectorWithWidgetPreference;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -222,6 +223,7 @@ public class UsbDetailsFunctionsControllerTest {
        assertThat(prefs.get(3).isChecked()).isFalse();
    }

    @Ignore("b/313362757")
    @Test
    public void onClickNone_mtpEnabled_shouldDisableMtp() {
        when(mUsbBackend.areFunctionsSupported(anyLong())).thenReturn(true);
+8 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import com.android.settings.R;
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.ArgumentCaptor;
@@ -100,6 +101,7 @@ public class UsbDetailsPowerRoleControllerTest {
        mDetailsPowerRoleController.mHandler = mHandler;
    }

    @Ignore("b/313362757")
    @Test
    public void displayRefresh_sink_shouldUncheck() {
        mDetailsPowerRoleController.displayPreference(mScreen);
@@ -112,6 +114,7 @@ public class UsbDetailsPowerRoleControllerTest {
        assertThat(pref.isChecked()).isFalse();
    }

    @Ignore("b/313362757")
    @Test
    public void displayRefresh_source_shouldCheck() {
        mDetailsPowerRoleController.displayPreference(mScreen);
@@ -149,6 +152,7 @@ public class UsbDetailsPowerRoleControllerTest {
                mDetailsPowerRoleController.getPreferenceKey())).isNull();
    }

    @Ignore("b/313362757")
    @Test
    public void onClick_sink_shouldSetSource() {
        mDetailsPowerRoleController.displayPreference(mScreen);
@@ -162,6 +166,7 @@ public class UsbDetailsPowerRoleControllerTest {
                .isEqualTo(mContext.getString(R.string.usb_switching));
    }

    @Ignore("b/313362757")
    @Test
    public void onClickTwice_sink_shouldSetSourceOnce() {
        mDetailsPowerRoleController.displayPreference(mScreen);
@@ -176,6 +181,7 @@ public class UsbDetailsPowerRoleControllerTest {
        verify(mUsbBackend, times(1)).setPowerRole(POWER_ROLE_SOURCE);
    }

    @Ignore("b/313362757")
    @Test
    public void onClickDeviceAndRefresh_success_shouldClearSubtext() {
        mDetailsPowerRoleController.displayPreference(mScreen);
@@ -194,6 +200,7 @@ public class UsbDetailsPowerRoleControllerTest {
        assertThat(pref.getSummary()).isEqualTo("");
    }

    @Ignore("b/313362757")
    @Test
    public void onClickDeviceAndRefresh_failed_shouldShowFailureText() {
        mDetailsPowerRoleController.displayPreference(mScreen);
@@ -213,6 +220,7 @@ public class UsbDetailsPowerRoleControllerTest {
                .isEqualTo(mContext.getString(R.string.usb_switching_failed));
    }

    @Ignore("b/313362757")
    @Test
    public void onClickDevice_timedOut_shouldShowFailureText() {
        mDetailsPowerRoleController.displayPreference(mScreen);
+6 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import androidx.preference.SwitchPreference;
import com.android.settings.testutils.shadow.ShadowUtils;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Mock;
@@ -118,6 +119,7 @@ public class UsbDetailsTranscodeMtpControllerTest {
        assertThat(mPreference.isEnabled()).isFalse();
    }

    @Ignore("b/313362757")
    @Test
    public void displayRefresh_fileTransfer_withAbsentProp_shouldCheck() {
        mUnderTest.displayPreference(mScreen);
@@ -129,6 +131,7 @@ public class UsbDetailsTranscodeMtpControllerTest {
        assertThat(getSwitchPreference().isChecked()).isFalse();
    }

    @Ignore("b/313362757")
    @Test
    public void displayRefresh_fileTransfer_withUnsetProp_shouldUncheck() {
        mUnderTest.displayPreference(mScreen);
@@ -141,6 +144,7 @@ public class UsbDetailsTranscodeMtpControllerTest {
        assertThat(getSwitchPreference().isChecked()).isFalse();
    }

    @Ignore("b/313362757")
    @Test
    public void displayRefresh_fileTransfer_withSetProp_shouldCheck() {
        mUnderTest.displayPreference(mScreen);
@@ -153,6 +157,7 @@ public class UsbDetailsTranscodeMtpControllerTest {
        assertThat(getSwitchPreference().isChecked()).isTrue();
    }

    @Ignore("b/313362757")
    @Test
    public void click_checked_shouldSetSystemProperty() {
        mUnderTest.displayPreference(mScreen);
@@ -160,6 +165,7 @@ public class UsbDetailsTranscodeMtpControllerTest {
        assertThat(SystemProperties.getBoolean(TRANSCODE_MTP_SYS_PROP_KEY, false)).isTrue();
    }

    @Ignore("b/313362757")
    @Test
    public void click_unChecked_shouldUnsetSystemProperty() {
        mUnderTest.displayPreference(mScreen);