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

Commit 1905a061 authored by Antonella Dellanzo's avatar Antonella Dellanzo Committed by Android (Google) Code Review
Browse files

Merge changes from topic "fix-assertions-type-enable-param"

* changes:
  Fix params of flicker assertions
  Disable assertion in SeamlessAppRotation test
  Fix params of flicker assertions
parents dd9cc9f4 3b0ae16d
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ fun WmAssertion.statusBarWindowIsAlwaysVisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
    all("statusBarWindowIsAlwaysVisible", enabled, bugId) {
    all("statusBarWindowIsAlwaysVisible", bugId, enabled) {
        this.showsAboveAppWindow(FlickerTestBase.STATUS_BAR_WINDOW_TITLE)
    }
}
@@ -36,7 +36,7 @@ fun WmAssertion.navBarWindowIsAlwaysVisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
    all("navBarWindowIsAlwaysVisible", enabled, bugId) {
    all("navBarWindowIsAlwaysVisible", bugId, enabled) {
        this.showsAboveAppWindow(FlickerTestBase.NAVIGATION_BAR_WINDOW_TITLE)
    }
}
@@ -52,7 +52,7 @@ fun LayersAssertion.noUncoveredRegions(
    val startingBounds = WindowUtils.getDisplayBounds(beginRotation)
    val endingBounds = WindowUtils.getDisplayBounds(endRotation)
    if (allStates) {
        all("noUncoveredRegions", enabled, bugId) {
        all("noUncoveredRegions", bugId, enabled) {
            if (startingBounds == endingBounds) {
                this.coversAtLeastRegion(startingBounds)
            } else {
@@ -76,7 +76,7 @@ fun LayersAssertion.navBarLayerIsAlwaysVisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
    all("navBarLayerIsAlwaysVisible", enabled, bugId) {
    all("navBarLayerIsAlwaysVisible", bugId, enabled) {
        this.showsLayer(FlickerTestBase.NAVIGATION_BAR_WINDOW_TITLE)
    }
}
@@ -86,7 +86,7 @@ fun LayersAssertion.statusBarLayerIsAlwaysVisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
    all("statusBarLayerIsAlwaysVisible", enabled, bugId) {
    all("statusBarLayerIsAlwaysVisible", bugId, enabled) {
        this.showsLayer(FlickerTestBase.STATUS_BAR_WINDOW_TITLE)
    }
}
@@ -101,15 +101,15 @@ fun LayersAssertion.navBarLayerRotatesAndScales(
    val startingPos = WindowUtils.getNavigationBarPosition(beginRotation)
    val endingPos = WindowUtils.getNavigationBarPosition(endRotation)

    start("navBarLayerRotatesAndScales_StartingPos", enabled, bugId) {
    start("navBarLayerRotatesAndScales_StartingPos", bugId, enabled) {
        this.hasVisibleRegion(FlickerTestBase.NAVIGATION_BAR_WINDOW_TITLE, startingPos)
    }
    end("navBarLayerRotatesAndScales_EndingPost", enabled, bugId) {
    end("navBarLayerRotatesAndScales_EndingPost", bugId, enabled) {
        this.hasVisibleRegion(FlickerTestBase.NAVIGATION_BAR_WINDOW_TITLE, endingPos)
    }

    if (startingPos == endingPos) {
        all("navBarLayerRotatesAndScales", enabled, bugId) {
        all("navBarLayerRotatesAndScales", bugId, enabled) {
            this.hasVisibleRegion(FlickerTestBase.NAVIGATION_BAR_WINDOW_TITLE, startingPos)
        }
    }
@@ -125,10 +125,10 @@ fun LayersAssertion.statusBarLayerRotatesScales(
    val startingPos = WindowUtils.getStatusBarPosition(beginRotation)
    val endingPos = WindowUtils.getStatusBarPosition(endRotation)

    start("statusBarLayerRotatesScales_StartingPos", enabled, bugId) {
    start("statusBarLayerRotatesScales_StartingPos", bugId, enabled) {
        this.hasVisibleRegion(FlickerTestBase.STATUS_BAR_WINDOW_TITLE, startingPos)
    }
    end("statusBarLayerRotatesScales_EndingPos", enabled, bugId) {
    end("statusBarLayerRotatesScales_EndingPos", bugId, enabled) {
        this.hasVisibleRegion(FlickerTestBase.STATUS_BAR_WINDOW_TITLE, endingPos)
    }
}
+11 −11
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ fun WmAssertion.statusBarWindowIsAlwaysVisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
    all("statusBarWindowIsAlwaysVisible", enabled, bugId) {
    all("statusBarWindowIsAlwaysVisible", bugId, enabled) {
        this.showsAboveAppWindow(STATUS_BAR_WINDOW_TITLE)
    }
}
@@ -40,7 +40,7 @@ fun WmAssertion.navBarWindowIsAlwaysVisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
    all("navBarWindowIsAlwaysVisible", enabled, bugId) {
    all("navBarWindowIsAlwaysVisible", bugId, enabled) {
        this.showsAboveAppWindow(NAVIGATION_BAR_WINDOW_TITLE)
    }
}
@@ -56,7 +56,7 @@ fun LayersAssertion.noUncoveredRegions(
    val startingBounds = WindowUtils.getDisplayBounds(beginRotation)
    val endingBounds = WindowUtils.getDisplayBounds(endRotation)
    if (allStates) {
        all("noUncoveredRegions", enabled, bugId) {
        all("noUncoveredRegions", bugId, enabled) {
            if (startingBounds == endingBounds) {
                this.coversAtLeastRegion(startingBounds)
            } else {
@@ -82,7 +82,7 @@ fun LayersAssertion.navBarLayerIsAlwaysVisible(
    enabled: Boolean = bugId == 0
) {
    if (rotatesScreen) {
        all("navBarLayerIsAlwaysVisible", enabled, bugId) {
        all("navBarLayerIsAlwaysVisible", bugId, enabled) {
            this.showsLayer(NAVIGATION_BAR_WINDOW_TITLE)
                    .then()
                    .hidesLayer(NAVIGATION_BAR_WINDOW_TITLE)
@@ -90,7 +90,7 @@ fun LayersAssertion.navBarLayerIsAlwaysVisible(
                    .showsLayer(NAVIGATION_BAR_WINDOW_TITLE)
        }
    } else {
        all("navBarLayerIsAlwaysVisible", enabled, bugId) {
        all("navBarLayerIsAlwaysVisible", bugId, enabled) {
            this.showsLayer(NAVIGATION_BAR_WINDOW_TITLE)
        }
    }
@@ -103,7 +103,7 @@ fun LayersAssertion.statusBarLayerIsAlwaysVisible(
    enabled: Boolean = bugId == 0
) {
    if (rotatesScreen) {
        all("statusBarLayerIsAlwaysVisible", enabled, bugId) {
        all("statusBarLayerIsAlwaysVisible", bugId, enabled) {
            this.showsLayer(STATUS_BAR_WINDOW_TITLE)
                    .then()
                    hidesLayer(STATUS_BAR_WINDOW_TITLE)
@@ -111,7 +111,7 @@ fun LayersAssertion.statusBarLayerIsAlwaysVisible(
                    .showsLayer(STATUS_BAR_WINDOW_TITLE)
        }
    } else {
        all("statusBarLayerIsAlwaysVisible", enabled, bugId) {
        all("statusBarLayerIsAlwaysVisible", bugId, enabled) {
            this.showsLayer(STATUS_BAR_WINDOW_TITLE)
        }
    }
@@ -127,10 +127,10 @@ fun LayersAssertion.navBarLayerRotatesAndScales(
    val startingPos = WindowUtils.getNavigationBarPosition(beginRotation)
    val endingPos = WindowUtils.getNavigationBarPosition(endRotation)

    start("navBarLayerRotatesAndScales_StartingPos", enabled, bugId) {
    start("navBarLayerRotatesAndScales_StartingPos", bugId, enabled) {
        this.hasVisibleRegion(NAVIGATION_BAR_WINDOW_TITLE, startingPos)
    }
    end("navBarLayerRotatesAndScales_EndingPost", enabled, bugId) {
    end("navBarLayerRotatesAndScales_EndingPost", bugId, enabled) {
        this.hasVisibleRegion(NAVIGATION_BAR_WINDOW_TITLE, endingPos)
    }

@@ -151,10 +151,10 @@ fun LayersAssertion.statusBarLayerRotatesScales(
    val startingPos = WindowUtils.getStatusBarPosition(beginRotation)
    val endingPos = WindowUtils.getStatusBarPosition(endRotation)

    start("statusBarLayerRotatesScales_StartingPos", enabled, bugId) {
    start("statusBarLayerRotatesScales_StartingPos", bugId, enabled) {
        this.hasVisibleRegion(STATUS_BAR_WINDOW_TITLE, startingPos)
    }
    end("statusBarLayerRotatesScales_EndingPos", enabled, bugId) {
    end("statusBarLayerRotatesScales_EndingPos", bugId, enabled) {
        this.hasVisibleRegion(STATUS_BAR_WINDOW_TITLE, endingPos)
    }
}
+7 −7
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ fun LayersAssertion.imeLayerBecomesVisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
    all("imeLayerBecomesVisible", enabled, bugId) {
    all("imeLayerBecomesVisible", bugId, enabled) {
        this.hidesLayer(IME_WINDOW_TITLE)
                .then()
                .showsLayer(IME_WINDOW_TITLE)
@@ -38,7 +38,7 @@ fun LayersAssertion.imeLayerBecomesInvisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
    all("imeLayerBecomesInvisible", enabled, bugId) {
    all("imeLayerBecomesInvisible", bugId, enabled) {
        this.showsLayer(IME_WINDOW_TITLE)
                .then()
                .hidesLayer(IME_WINDOW_TITLE)
@@ -50,7 +50,7 @@ fun LayersAssertion.imeAppLayerIsAlwaysVisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
    all("imeAppLayerIsAlwaysVisible", enabled, bugId) {
    all("imeAppLayerIsAlwaysVisible", bugId, enabled) {
        this.showsLayer(testApp.getPackage())
    }
}
@@ -60,7 +60,7 @@ fun WmAssertion.imeAppWindowIsAlwaysVisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
    all("imeAppWindowIsAlwaysVisible", enabled, bugId) {
    all("imeAppWindowIsAlwaysVisible", bugId, enabled) {
        this.showsAppWindowOnTop(testApp.getPackage())
    }
}
@@ -69,7 +69,7 @@ fun WmAssertion.imeWindowBecomesInvisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
    all("imeWindowBecomesInvisible", enabled, bugId) {
    all("imeWindowBecomesInvisible", bugId, enabled) {
        this.showsNonAppWindow(IME_WINDOW_TITLE)
                .then()
                .hidesNonAppWindow(IME_WINDOW_TITLE)
@@ -81,7 +81,7 @@ fun WmAssertion.imeAppWindowBecomesInvisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
    all("imeAppWindowBecomesInvisible", enabled, bugId) {
    all("imeAppWindowBecomesInvisible", bugId, enabled) {
        this.showsAppWindowOnTop(testApp.getPackage())
                .then()
                .appWindowNotOnTop(testApp.getPackage())
@@ -93,7 +93,7 @@ fun LayersAssertion.imeAppLayerBecomesInvisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
    all("imeAppLayerBecomesInvisible", enabled, bugId) {
    all("imeAppLayerBecomesInvisible", bugId, enabled) {
        this.skipUntilFirstAssertion()
                .showsLayer(testApp.getPackage())
                .then()
+3 −3
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ fun WmAssertion.wallpaperWindowBecomesInvisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
    all("wallpaperWindowBecomesInvisible", enabled, bugId) {
    all("wallpaperWindowBecomesInvisible", bugId, enabled) {
        this.showsBelowAppWindow("Wallpaper")
                .then()
                .hidesBelowAppWindow("Wallpaper")
@@ -36,7 +36,7 @@ fun WmAssertion.appWindowReplacesLauncherAsTopWindow(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
    all("appWindowReplacesLauncherAsTopWindow", enabled, bugId) {
    all("appWindowReplacesLauncherAsTopWindow", bugId, enabled) {
        this.showsAppWindowOnTop("Launcher")
                .then()
                .showsAppWindowOnTop("Snapshot", testApp.getPackage())
@@ -48,7 +48,7 @@ fun LayersAssertion.wallpaperLayerBecomesInvisible(
    bugId: Int = 0,
    enabled: Boolean = bugId == 0
) {
    all("wallpaperLayerBecomesInvisible", enabled, bugId) {
    all("wallpaperLayerBecomesInvisible", bugId, enabled) {
        this.showsLayer("Wallpaper")
                .then()
                .replaceVisibleLayer("Wallpaper", testApp.getPackage())
+1 −1
Original line number Diff line number Diff line
@@ -173,7 +173,7 @@ class SeamlessAppRotationTest(
                            }
                        }

                        all("noUncoveredRegions"/*, bugId = 147659548*/) {
                        all("noUncoveredRegions", bugId = 147659548) {
                            if (startingBounds == endingBounds) {
                                this.coversAtLeastRegion(startingBounds)
                            } else {