Merge "Fix task bar assertions on tablets when screen is locked"
This commit is contained in:
committed by
Android (Google) Code Review
commit
713e9927f5
@@ -108,7 +108,8 @@ abstract class BaseTest @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the [ComponentMatcher.TASK_BAR] layer is visible during the whole transition
|
||||
* Checks that the [ComponentMatcher.TASK_BAR] window is visible at the start and end of the
|
||||
* transition
|
||||
*
|
||||
* Note: Large screen only
|
||||
*/
|
||||
@@ -132,7 +133,8 @@ abstract class BaseTest @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the [ComponentMatcher.STATUS_BAR] layer is visible during the whole transition
|
||||
* Checks that the [ComponentMatcher.STATUS_BAR] layer is visible at the start and end
|
||||
* of the transition
|
||||
*/
|
||||
@Presubmit
|
||||
@Test
|
||||
|
||||
@@ -52,6 +52,16 @@ fun FlickerTestParameter.taskBarWindowIsAlwaysVisible() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that [ComponentMatcher.TASK_BAR] window is visible and above the app windows in
|
||||
* all WM trace entries
|
||||
*/
|
||||
fun FlickerTestParameter.taskBarWindowIsVisibleAtEnd() {
|
||||
assertWmEnd {
|
||||
this.isAboveAppWindowVisible(ComponentMatcher.TASK_BAR)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* If [allStates] is true, checks if the stack space of all displays is fully covered
|
||||
* by any visible layer, during the whole transitions
|
||||
@@ -103,9 +113,25 @@ fun FlickerTestParameter.navBarLayerIsVisibleAtStartAndEnd() {
|
||||
* trace
|
||||
*/
|
||||
fun FlickerTestParameter.taskBarLayerIsVisibleAtStartAndEnd() {
|
||||
this.taskBarLayerIsVisibleAtStart()
|
||||
this.taskBarLayerIsVisibleAtEnd()
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that [ComponentMatcher.TASK_BAR] layer is visible at the start of the SF
|
||||
* trace
|
||||
*/
|
||||
fun FlickerTestParameter.taskBarLayerIsVisibleAtStart() {
|
||||
assertLayersStart {
|
||||
this.isVisible(ComponentMatcher.TASK_BAR)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that [ComponentMatcher.TASK_BAR] layer is visible at the end of the SF
|
||||
* trace
|
||||
*/
|
||||
fun FlickerTestParameter.taskBarLayerIsVisibleAtEnd() {
|
||||
assertLayersEnd {
|
||||
this.isVisible(ComponentMatcher.TASK_BAR)
|
||||
}
|
||||
|
||||
@@ -32,8 +32,12 @@ import com.android.server.wm.flicker.helpers.NotificationAppHelper
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import com.android.server.wm.flicker.helpers.setRotation
|
||||
import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen
|
||||
import com.android.server.wm.flicker.taskBarLayerIsVisibleAtEnd
|
||||
import com.android.server.wm.flicker.taskBarWindowIsVisibleAtEnd
|
||||
import com.android.server.wm.traces.common.ComponentMatcher
|
||||
import org.junit.Assume
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.Ignore
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.MethodSorters
|
||||
@@ -231,6 +235,42 @@ open class OpenAppFromNotificationWarm(
|
||||
super.appWindowBecomesTopWindow()
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the [ComponentMatcher.TASK_BAR] window is visible at the end of the transition
|
||||
*
|
||||
* Note: Large screen only
|
||||
*/
|
||||
@Postsubmit
|
||||
@Test
|
||||
open fun taskBarWindowIsVisibleAtEnd() {
|
||||
Assume.assumeFalse(testSpec.isTablet)
|
||||
testSpec.taskBarWindowIsVisibleAtEnd()
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the [ComponentMatcher.TASK_BAR] layer is visible at the end of the transition
|
||||
*
|
||||
* Note: Large screen only
|
||||
*/
|
||||
@Postsubmit
|
||||
@Test
|
||||
open fun taskBarLayerIsVisibleAtEnd() {
|
||||
Assume.assumeFalse(testSpec.isTablet)
|
||||
testSpec.taskBarLayerIsVisibleAtEnd()
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Test
|
||||
@Ignore("Display is locked at the start")
|
||||
override fun taskBarWindowIsAlwaysVisible() =
|
||||
super.taskBarWindowIsAlwaysVisible()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Test
|
||||
@Ignore("Display is locked at the start")
|
||||
override fun taskBarLayerIsVisibleAtStartAndEnd() =
|
||||
super.taskBarLayerIsVisibleAtStartAndEnd()
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Creates the test configurations.
|
||||
|
||||
Reference in New Issue
Block a user