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

Commit 3bc2c00a authored by Antonella Dellanzo's avatar Antonella Dellanzo
Browse files

Ignore letterbox in two tests

Two tests in EnterLegacySplitScreen were failing from time to time with letter box layer not showing 2+ times. We are ignoring it also in the assertions and refactoring the assertion to only ignore the app layers used in each corresponding case instead of ignoring all of them.

Test: atest WMShellFlickerTests
Bug: b/171049797
Change-Id: I6212f833c790fb0fa002cae2f7a3efc688168578
parent 17116c10
Loading
Loading
Loading
Loading
+20 −5
Original line number Original line Diff line number Diff line
@@ -58,6 +58,8 @@ class EnterLegacySplitScreenTest(
    rotationName: String,
    rotationName: String,
    rotation: Int
    rotation: Int
) : SplitScreenTestBase(rotationName, rotation) {
) : SplitScreenTestBase(rotationName, rotation) {
    private val letterBox = "Letterbox"

    private val splitScreenSetup: FlickerBuilder
    private val splitScreenSetup: FlickerBuilder
        get() = FlickerBuilder(instrumentation).apply {
        get() = FlickerBuilder(instrumentation).apply {
            val testLaunchActivity = "launch_splitScreen_test_activity"
            val testLaunchActivity = "launch_splitScreen_test_activity"
@@ -83,11 +85,6 @@ class EnterLegacySplitScreenTest(
                layersTrace {
                layersTrace {
                    navBarLayerIsAlwaysVisible()
                    navBarLayerIsAlwaysVisible()
                    statusBarLayerIsAlwaysVisible()
                    statusBarLayerIsAlwaysVisible()
                    visibleLayersShownMoreThanOneConsecutiveEntry(
                            listOf(launcherPackageName, splitScreenApp.defaultWindowName,
                                    secondaryApp.defaultWindowName,
                                    nonResizeableApp.defaultWindowName)
                    )
                }
                }
                windowManagerTrace {
                windowManagerTrace {
                    navBarWindowIsAlwaysVisible()
                    navBarWindowIsAlwaysVisible()
@@ -114,6 +111,9 @@ class EnterLegacySplitScreenTest(
                    dockedStackPrimaryBoundsIsVisible(
                    dockedStackPrimaryBoundsIsVisible(
                            rotation, splitScreenApp.defaultWindowName, 169271943)
                            rotation, splitScreenApp.defaultWindowName, 169271943)
                    dockedStackDividerBecomesVisible()
                    dockedStackDividerBecomesVisible()
                    visibleLayersShownMoreThanOneConsecutiveEntry(
                            listOf(launcherPackageName, splitScreenApp.defaultWindowName)
                    )
                }
                }
                windowManagerTrace {
                windowManagerTrace {
                    end {
                    end {
@@ -145,6 +145,10 @@ class EnterLegacySplitScreenTest(
                    dockedStackSecondaryBoundsIsVisible(
                    dockedStackSecondaryBoundsIsVisible(
                            rotation, secondaryApp.defaultWindowName, 169271943)
                            rotation, secondaryApp.defaultWindowName, 169271943)
                    dockedStackDividerBecomesVisible()
                    dockedStackDividerBecomesVisible()
                    visibleLayersShownMoreThanOneConsecutiveEntry(
                            listOf(launcherPackageName, splitScreenApp.defaultWindowName,
                                    secondaryApp.defaultWindowName)
                    )
                }
                }
                windowManagerTrace {
                windowManagerTrace {
                    end {
                    end {
@@ -174,6 +178,9 @@ class EnterLegacySplitScreenTest(
            assertions {
            assertions {
                layersTrace {
                layersTrace {
                    dockedStackDividerIsInvisible()
                    dockedStackDividerIsInvisible()
                    visibleLayersShownMoreThanOneConsecutiveEntry(
                            listOf(launcherPackageName, nonResizeableApp.defaultWindowName)
                    )
                }
                }
                windowManagerTrace {
                windowManagerTrace {
                    end {
                    end {
@@ -205,6 +212,10 @@ class EnterLegacySplitScreenTest(
                        val displayBounds = WindowUtils.getDisplayBounds(rotation)
                        val displayBounds = WindowUtils.getDisplayBounds(rotation)
                        this.hasVisibleRegion(nonResizeableApp.defaultWindowName, displayBounds)
                        this.hasVisibleRegion(nonResizeableApp.defaultWindowName, displayBounds)
                    }
                    }
                    visibleLayersShownMoreThanOneConsecutiveEntry(
                            listOf(launcherPackageName, splitScreenApp.defaultWindowName,
                                    nonResizeableApp.defaultWindowName, letterBox)
                    )
                }
                }
                windowManagerTrace {
                windowManagerTrace {
                    end {
                    end {
@@ -237,6 +248,10 @@ class EnterLegacySplitScreenTest(
                        val displayBounds = WindowUtils.getDisplayBounds(rotation)
                        val displayBounds = WindowUtils.getDisplayBounds(rotation)
                        this.hasVisibleRegion(nonResizeableApp.defaultWindowName, displayBounds)
                        this.hasVisibleRegion(nonResizeableApp.defaultWindowName, displayBounds)
                    }
                    }
                    visibleLayersShownMoreThanOneConsecutiveEntry(
                            listOf(launcherPackageName, splitScreenApp.defaultWindowName,
                                    nonResizeableApp.defaultWindowName, letterBox)
                    )
                }
                }
                windowManagerTrace {
                windowManagerTrace {
                    end {
                    end {