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

Commit 784adc03 authored by Jeff DeCew's avatar Jeff DeCew
Browse files

Fail tests that have failed to actually enable scene container.

Add a check if you've enabled FLAG_SCENE_CONTAINER but SceneContainerFlag.isEnabled is still false.

Change-Id: I03c37b09afc0e8189c29dccc5112b0cd0c64599c
Flag: NA
Test: atest SystemUITests
parent 31d18e5b
Loading
Loading
Loading
Loading
+15 −0
Original line number Original line Diff line number Diff line
@@ -43,6 +43,21 @@ class SceneContainerRule : TestRule {
                        SceneContainerFlag.isEnabled
                        SceneContainerFlag.isEnabled
                    )
                    )
                }
                }
                // Get the flag value, treating the unset error as false.
                val sceneContainerAconfigEnabled = try {
                    com.android.systemui.Flags.sceneContainer()
                } catch (e: Exception) {
                    false
                }
                if (sceneContainerAconfigEnabled) {
                    Assert.assertTrue(
                            "FLAG_SCENE_CONTAINER is enabled but SceneContainerFlag.isEnabled" +
                                    " is false.  Use `.andSceneContainer()` from" +
                                    " SceneContainerFlagParameterization.kt to parameterize this" +
                                    " flag correctly.",
                            SceneContainerFlag.isEnabled
                    )
                }
                if (
                if (
                    description.hasAnnotation<BrokenWithSceneContainer>() &&
                    description.hasAnnotation<BrokenWithSceneContainer>() &&
                        SceneContainerFlag.isEnabled
                        SceneContainerFlag.isEnabled