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

Commit c246888e authored by Jiaming Cheng's avatar Jiaming Cheng
Browse files

[flexiglass] Fix QSImplTest for SceneContainerFlag

In this test, interactions with components like `FooterActionsViewModel`
did not occur as these components are not initialized or their relevant
code paths are skipped when the flag is enabled.

This cl fixed 5 tests by bypassing the tests with
`@DisableSceneContainer` annotation.

Bug: 416716520
Flag: com.android.systemui.scene_container
Test: com.android.systemui.qs.QSImplTest
     Locally run this test and verify all the tests are passed with the
     `@EnableSceneContainer` annotation.
Change-Id: Iadd4088ad5c459c2d340df7410e6bf9aea9bc0ef
parent 054af9e2
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ import androidx.test.filters.SmallTest;
import com.android.keyguard.BouncerPanelExpansionCalculator;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.dump.DumpManager;
import com.android.systemui.flags.DisableSceneContainer;
import com.android.systemui.flags.EnableSceneContainer;
import com.android.systemui.media.controls.ui.view.MediaHost;
import com.android.systemui.qs.customize.QSCustomizerController;
@@ -188,6 +189,7 @@ public class QSImplTest extends SysuiTestCase {
    }

    @Test
    @DisableSceneContainer
    public void
            transitionToFullShade_onKeyguard_noBouncer_setsAlphaUsingLinearInterpolator() {
        setStatusBarCurrentAndUpcomingState(KEYGUARD);
@@ -289,6 +291,7 @@ public class QSImplTest extends SysuiTestCase {
    }

    @Test
    @DisableSceneContainer
    public void setQsExpansion_inSplitShade_setsFooterActionsExpansion_basedOnPanelExpFraction() {
        // Random test values without any meaning. They just have to be different from each other.
        float expansion = 0.123f;
@@ -306,6 +309,7 @@ public class QSImplTest extends SysuiTestCase {
    }

    @Test
    @DisableSceneContainer
    public void setQsExpansion_notInSplitShade_setsFooterActionsExpansion_basedOnExpansion() {
        // Random test values without any meaning. They just have to be different from each other.
        float expansion = 0.123f;
@@ -500,6 +504,7 @@ public class QSImplTest extends SysuiTestCase {
    }

    @Test
    @DisableSceneContainer
    public void testUpdateQSBounds_setMediaClipCorrectly() {
        disableSplitShade();

@@ -516,6 +521,7 @@ public class QSImplTest extends SysuiTestCase {
    }

    @Test
    @DisableSceneContainer
    public void testQsUpdatesQsAnimatorWithUpcomingState() {
        setStatusBarCurrentAndUpcomingState(SHADE);
        mUnderTest.onUpcomingStateChanged(KEYGUARD);