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

Commit 2feb4833 authored by Antonella Dellanzo's avatar Antonella Dellanzo
Browse files

Fix params of flicker assertions

As now the AssertionTypes in Flicker checks for the bug id to set the default value of the enabled param, we are fixing all the calls to the assertions types as the params order changed.

Test: atest FlickerLibTest && atest FlickerTests
Bug: b/162923992
Change-Id: I16ccd9649caa15407896e23e91934f022e58445e
parent a1d07a8c
Loading
Loading
Loading
Loading
+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())