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

Commit 3bc1027c authored by Rubin Xu's avatar Rubin Xu Committed by Automerger Merge Worker
Browse files

Merge "Fix Settings password robo tests." into sc-dev am: 88cd3dae

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/13930307

Change-Id: Ibd2b04d640dbdcf5a0d92d4bbdd5fdcf8563dc07
parents 7cf3b8e8 88cd3dae
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -65,7 +65,6 @@ import com.android.settingslib.widget.FooterPreference;

import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.Robolectric;
@@ -233,7 +232,6 @@ public class ChooseLockGenericTest {
    }

    @Test
    @Ignore
    public void updatePreferencesOrFinish_callingAppIsAdmin_deviceNotProvisioned_footerInvisible() {
        Global.putInt(application.getContentResolver(), Global.DEVICE_PROVISIONED, 0);
        initActivity(new Intent().putExtra(EXTRA_KEY_IS_CALLING_APP_ADMIN, true));
+5 −7
Original line number Diff line number Diff line
@@ -50,7 +50,6 @@ import com.google.android.setupcompat.util.WizardManagerHelper;

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;
@@ -105,18 +104,17 @@ public class SetNewPasswordActivityTest {
    }

    @Test
    @Ignore
    public void testSetupChooseLockGeneric() {
        Settings.Global.putInt(RuntimeEnvironment.application.getContentResolver(),
                Settings.Global.DEVICE_PROVISIONED, 0);
        Intent intent = new Intent(ACTION_SET_NEW_PASSWORD);
        intent.putExtra(WizardManagerHelper.EXTRA_IS_SETUP_FLOW, true);
        SetNewPasswordActivity activity =
                Robolectric.buildActivity(SetNewPasswordActivity.class).get();
        activity.launchChooseLock(new Bundle());
                Robolectric.buildActivity(SetNewPasswordActivity.class, intent).create().get();
        ShadowActivity shadowActivity = Shadows.shadowOf(activity);
        Intent intent = getLaunchChooseLockIntent(shadowActivity);
        intent.putExtra(WizardManagerHelper.EXTRA_IS_FIRST_RUN, true);

        assertThat(intent.getComponent())
        Intent nextIntent = shadowActivity.getNextStartedActivityForResult().intent;
        assertThat(nextIntent.getComponent())
                .isEqualTo(new ComponentName(activity, SetupChooseLockGeneric.class));
    }