Merge "Downgrade failing flicker tests or fix assertions"

This commit is contained in:
TreeHugger Robot
2022-07-07 12:33:58 +00:00
committed by Android (Google) Code Review
9 changed files with 45 additions and 11 deletions

View File

@@ -21,11 +21,6 @@ import com.android.server.wm.flicker.helpers.WindowUtils
import com.android.server.wm.flicker.traces.region.RegionSubject
import com.android.server.wm.traces.common.FlickerComponentName
val LAUNCHER_COMPONENT = FlickerComponentName(
"com.google.android.apps.nexuslauncher",
"com.google.android.apps.nexuslauncher.NexusLauncherActivity"
)
/**
* Checks that [FlickerComponentName.STATUS_BAR] window is visible and above the app windows in
* all WM trace entries

View File

@@ -191,6 +191,10 @@ abstract class CloseAppTransition(protected val testSpec: FlickerTestParameter)
@Presubmit
@Test
open fun launcherLayerReplacesApp() {
testSpec.replacesLayer(testApp.component, LAUNCHER)
testSpec.replacesLayer(
testApp.component,
LAUNCHER,
ignoreEntriesWithRotationLayer = testSpec.isLandscapeOrSeascapeAtStart
)
}
}

View File

@@ -60,11 +60,11 @@ abstract class OpenAppFromLauncherTransition(testSpec: FlickerTestParameter) :
testSpec.assertWm {
this.isAppWindowOnTop(FlickerComponentName.LAUNCHER)
.then()
.isAppWindowOnTop(FlickerComponentName.SNAPSHOT, isOptional = true)
.then()
.isAppWindowOnTop(FlickerComponentName.SPLASH_SCREEN, isOptional = true)
.then()
.isAppWindowOnTop(testApp.component)
.isAppWindowOnTop(
testApp.component
.or(FlickerComponentName.SNAPSHOT)
.or(FlickerComponentName.SPLASH_SCREEN)
)
}
}
}

View File

@@ -143,6 +143,12 @@ open class OpenAppFromLockNotificationCold(testSpec: FlickerTestParameter) :
override fun visibleLayersShownMoreThanOneConsecutiveEntry() =
super.visibleLayersShownMoreThanOneConsecutiveEntry()
/** {@inheritDoc} */
@Postsubmit
@Test
override fun appWindowIsTopWindowAtEnd() =
super.appWindowIsTopWindowAtEnd()
companion object {
/**
* Creates the test configurations.

View File

@@ -174,6 +174,12 @@ open class OpenAppFromLockNotificationWarm(testSpec: FlickerTestParameter) :
override fun visibleLayersShownMoreThanOneConsecutiveEntry() =
super.visibleLayersShownMoreThanOneConsecutiveEntry()
/** {@inheritDoc} */
@Postsubmit
@Test
override fun appWindowIsTopWindowAtEnd() =
super.appWindowIsTopWindowAtEnd()
companion object {
/**
* Creates the test configurations.

View File

@@ -180,6 +180,12 @@ class OpenAppFromLockNotificationWithLockOverlayApp(testSpec: FlickerTestParamet
override fun visibleWindowsShownMoreThanOneConsecutiveEntry() =
super.visibleWindowsShownMoreThanOneConsecutiveEntry()
/** {@inheritDoc} */
@Postsubmit
@Test
override fun appWindowIsTopWindowAtEnd() =
super.appWindowIsTopWindowAtEnd()
companion object {
/**
* Creates the test configurations.

View File

@@ -67,6 +67,12 @@ open class OpenAppFromNotificationCold(testSpec: FlickerTestParameter) :
@Postsubmit
override fun appLayerBecomesVisible() = appLayerBecomesVisible_coldStart()
/** {@inheritDoc} */
@Postsubmit
@Test
override fun appWindowIsTopWindowAtEnd() =
super.appWindowIsTopWindowAtEnd()
companion object {
/**
* Creates the test configurations.

View File

@@ -209,6 +209,12 @@ open class OpenAppFromNotificationWarm(testSpec: FlickerTestParameter) :
override fun visibleWindowsShownMoreThanOneConsecutiveEntry() =
super.visibleWindowsShownMoreThanOneConsecutiveEntry()
/** {@inheritDoc} */
@Postsubmit
@Test
override fun appWindowIsTopWindowAtEnd() =
super.appWindowIsTopWindowAtEnd()
companion object {
/**
* Creates the test configurations.

View File

@@ -159,6 +159,11 @@ open class OpenAppNonResizeableTest(testSpec: FlickerTestParameter) :
override fun visibleWindowsShownMoreThanOneConsecutiveEntry() =
super.visibleWindowsShownMoreThanOneConsecutiveEntry()
@FlakyTest(bugId = 227143265)
@Test
override fun appWindowBecomesTopWindow() =
super.appWindowBecomesTopWindow()
companion object {
/**
* Creates the test configurations.