Promote passing OpenAppAfterCameraTest without shell transitions
With shell transitions the test is still flaky Test: atest FlickerTests Change-Id: Ieab6b4eed63daef0eaeece09ab8bccd71051be08
This commit is contained in:
@@ -16,8 +16,6 @@
|
||||
|
||||
package com.android.server.wm.flicker.launch
|
||||
|
||||
import android.platform.test.annotations.FlakyTest
|
||||
import android.platform.test.annotations.Postsubmit
|
||||
import android.platform.test.annotations.RequiresDevice
|
||||
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
@@ -25,8 +23,10 @@ import com.android.server.wm.flicker.FlickerTestParameterFactory
|
||||
import com.android.server.wm.flicker.annotation.Group1
|
||||
import com.android.server.wm.flicker.dsl.FlickerBuilder
|
||||
import com.android.server.wm.flicker.helpers.CameraAppHelper
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.MethodSorters
|
||||
import org.junit.runners.Parameterized
|
||||
@@ -47,6 +47,11 @@ import org.junit.runners.Parameterized
|
||||
open class OpenAppAfterCameraTest(
|
||||
testSpec: FlickerTestParameter
|
||||
) : OpenAppFromLauncherTransition(testSpec) {
|
||||
@Before
|
||||
open fun before() {
|
||||
Assume.assumeFalse(isShellTransitionsEnabled)
|
||||
}
|
||||
|
||||
private val cameraApp = CameraAppHelper(instrumentation) /** {@inheritDoc} */
|
||||
override val transition: FlickerBuilder.() -> Unit
|
||||
get() = {
|
||||
@@ -67,105 +72,6 @@ open class OpenAppAfterCameraTest(
|
||||
}
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@FlakyTest(bugId = 206753786)
|
||||
@Test
|
||||
override fun navBarLayerPositionAtStartAndEnd() = super.navBarLayerPositionAtStartAndEnd()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun appLayerReplacesLauncher() = super.appLayerReplacesLauncher()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun focusChanges() = super.focusChanges()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun appWindowReplacesLauncherAsTopWindow() =
|
||||
super.appWindowReplacesLauncherAsTopWindow()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun appWindowAsTopWindowAtEnd() = super.appWindowAsTopWindowAtEnd()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun appLayerBecomesVisible() = super.appLayerBecomesVisible()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun appWindowBecomesVisible() = super.appWindowBecomesVisible()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun appWindowBecomesTopWindow() = super.appWindowBecomesTopWindow()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun appWindowIsTopWindowAtEnd() = super.appWindowIsTopWindowAtEnd()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun entireScreenCovered() = super.entireScreenCovered()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun navBarLayerIsVisibleAtStartAndEnd() = super.navBarLayerIsVisibleAtStartAndEnd()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun navBarWindowIsAlwaysVisible() = super.navBarWindowIsAlwaysVisible()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun taskBarLayerIsVisibleAtStartAndEnd() = super.taskBarLayerIsVisibleAtStartAndEnd()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun taskBarWindowIsAlwaysVisible() = super.taskBarWindowIsAlwaysVisible()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun statusBarLayerIsVisibleAtStartAndEnd() =
|
||||
super.statusBarLayerIsVisibleAtStartAndEnd()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun statusBarLayerPositionAtStartAndEnd() = super.statusBarLayerPositionAtStartAndEnd()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun statusBarWindowIsAlwaysVisible() = super.statusBarWindowIsAlwaysVisible()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun visibleLayersShownMoreThanOneConsecutiveEntry() =
|
||||
super.visibleLayersShownMoreThanOneConsecutiveEntry()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun visibleWindowsShownMoreThanOneConsecutiveEntry() =
|
||||
super.visibleWindowsShownMoreThanOneConsecutiveEntry()
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Creates the test configurations.
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
/*
|
||||
* Copyright (C) 2022 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.wm.flicker.launch
|
||||
|
||||
import android.platform.test.annotations.FlakyTest
|
||||
import android.platform.test.annotations.RequiresDevice
|
||||
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.MethodSorters
|
||||
import org.junit.runners.Parameterized
|
||||
|
||||
/**
|
||||
* Test launching an app after cold opening camera (with shell transitions)
|
||||
*
|
||||
* To run this test: `atest FlickerTests:OpenAppAfterCameraTest_ShellTransit`
|
||||
*
|
||||
* Notes:
|
||||
* Some default assertions are inherited [OpenAppTransition]
|
||||
*/
|
||||
@RequiresDevice
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class OpenAppAfterCameraTest_ShellTransit(
|
||||
testSpec: FlickerTestParameter
|
||||
) : OpenAppAfterCameraTest(testSpec) {
|
||||
@Before
|
||||
override fun before() {
|
||||
Assume.assumeFalse(isShellTransitionsEnabled)
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun appLayerReplacesLauncher() {
|
||||
super.appLayerReplacesLauncher()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun appLayerBecomesVisible() {
|
||||
super.appLayerBecomesVisible()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun appWindowBecomesTopWindow() {
|
||||
super.appWindowBecomesTopWindow()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun appWindowBecomesVisible() {
|
||||
super.appWindowBecomesVisible()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun appWindowIsTopWindowAtEnd() {
|
||||
super.appWindowIsTopWindowAtEnd()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun appWindowReplacesLauncherAsTopWindow() {
|
||||
super.appWindowReplacesLauncherAsTopWindow()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun entireScreenCovered() {
|
||||
super.entireScreenCovered()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun navBarLayerIsVisibleAtStartAndEnd() {
|
||||
super.navBarLayerIsVisibleAtStartAndEnd()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun navBarLayerPositionAtStartAndEnd() {
|
||||
super.navBarLayerPositionAtStartAndEnd()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun navBarWindowIsAlwaysVisible() {
|
||||
super.navBarWindowIsAlwaysVisible()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun statusBarLayerIsVisibleAtStartAndEnd() {
|
||||
super.statusBarLayerIsVisibleAtStartAndEnd()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun statusBarLayerPositionAtStartAndEnd() {
|
||||
super.statusBarLayerPositionAtStartAndEnd()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun statusBarWindowIsAlwaysVisible() {
|
||||
super.statusBarWindowIsAlwaysVisible()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun taskBarLayerIsVisibleAtStartAndEnd() {
|
||||
super.taskBarLayerIsVisibleAtStartAndEnd()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun taskBarWindowIsAlwaysVisible() {
|
||||
super.taskBarWindowIsAlwaysVisible()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun visibleLayersShownMoreThanOneConsecutiveEntry() {
|
||||
super.visibleLayersShownMoreThanOneConsecutiveEntry()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun visibleWindowsShownMoreThanOneConsecutiveEntry() {
|
||||
super.visibleWindowsShownMoreThanOneConsecutiveEntry()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun focusChanges() {
|
||||
super.focusChanges()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
override fun appWindowAsTopWindowAtEnd() {
|
||||
super.appWindowAsTopWindowAtEnd()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user