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 (ag/12886026), we are fixing all the calls to the assertions types as the params order changed. Test: atest WMShellFlickerTests Bug: b/162923992 Change-Id: I04c0b70aeb201dc1d7627571cc4809e959bd2370
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user