Promote passing app launch tests

Bug: 206753786
Bug: 240916028
Test: atest FlickerTest
Change-Id: I60ad08507104724a982cdb7c059d9879795fc1ee
This commit is contained in:
Nataniel Borges
2023-01-11 16:51:15 +00:00
parent a56949a843
commit 7c270b3a8d
11 changed files with 6 additions and 303 deletions

View File

@@ -16,7 +16,6 @@
package com.android.server.wm.flicker.launch
import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Presubmit
import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.BaseTest
@@ -74,11 +73,6 @@ open class ActivitiesTransitionTest(flicker: FlickerTest) : BaseTest(flicker) {
}
}
/** {@inheritDoc} */
@FlakyTest(bugId = 206753786)
@Test
override fun navBarLayerPositionAtStartAndEnd() = super.navBarLayerPositionAtStartAndEnd()
/**
* Checks that the [ActivityOptions.LaunchNewActivity] activity is visible at the start of the
* transition, that [ActivityOptions.SimpleActivity] becomes visible during the transition, and

View File

@@ -21,10 +21,7 @@ import com.android.server.wm.flicker.FlickerBuilder
import com.android.server.wm.flicker.FlickerTest
import com.android.server.wm.flicker.FlickerTestFactory
import com.android.server.wm.flicker.helpers.CameraAppHelper
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
import org.junit.Assume
import org.junit.Before
import org.junit.FixMethodOrder
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@@ -42,11 +39,6 @@ import org.junit.runners.Parameterized
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
open class OpenAppAfterCameraTest(flicker: FlickerTest) : OpenAppFromLauncherTransition(flicker) {
@Before
open fun before() {
Assume.assumeFalse(isShellTransitionsEnabled)
}
private val cameraApp = CameraAppHelper(instrumentation)
/** {@inheritDoc} */
override val transition: FlickerBuilder.() -> Unit

View File

@@ -1,162 +0,0 @@
/*
* 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 androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.FlickerTest
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
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
/**
* 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(flicker: FlickerTest) : OpenAppAfterCameraTest(flicker) {
@Before
override fun before() {
Assume.assumeTrue(isShellTransitionsEnabled)
}
@FlakyTest
@Test
override fun appLayerReplacesLauncher() {
super.appLayerReplacesLauncher()
}
@FlakyTest
@Test
override fun appLayerBecomesVisible() {
super.appLayerBecomesVisible()
}
@FlakyTest
@Test
override fun appWindowBecomesTopWindow() {
super.appWindowBecomesTopWindow()
}
@FlakyTest
@Test
override fun appWindowBecomesVisible() {
super.appWindowBecomesVisible()
}
@FlakyTest
@Test
override fun appWindowIsTopWindowAtEnd() {
super.appWindowIsTopWindowAtEnd()
}
@FlakyTest
@Test
override fun appWindowReplacesLauncherAsTopWindow() {
super.appWindowReplacesLauncherAsTopWindow()
}
@FlakyTest
@Test
override fun entireScreenCovered() {
super.entireScreenCovered()
}
@FlakyTest
@Test
override fun navBarLayerIsVisibleAtStartAndEnd() {
super.navBarLayerIsVisibleAtStartAndEnd()
}
@FlakyTest
@Test
override fun navBarLayerPositionAtStartAndEnd() {
super.navBarLayerPositionAtStartAndEnd()
}
@FlakyTest
@Test
override fun navBarWindowIsAlwaysVisible() {
super.navBarWindowIsAlwaysVisible()
}
@FlakyTest
@Test
override fun statusBarLayerIsVisibleAtStartAndEnd() {
super.statusBarLayerIsVisibleAtStartAndEnd()
}
@FlakyTest
@Test
override fun statusBarLayerPositionAtStartAndEnd() {
super.statusBarLayerPositionAtStartAndEnd()
}
@FlakyTest
@Test
override fun statusBarWindowIsAlwaysVisible() {
super.statusBarWindowIsAlwaysVisible()
}
@FlakyTest
@Test
override fun taskBarLayerIsVisibleAtStartAndEnd() {
super.taskBarLayerIsVisibleAtStartAndEnd()
}
@FlakyTest
@Test
override fun taskBarWindowIsAlwaysVisible() {
super.taskBarWindowIsAlwaysVisible()
}
@FlakyTest
@Test
override fun visibleLayersShownMoreThanOneConsecutiveEntry() {
super.visibleLayersShownMoreThanOneConsecutiveEntry()
}
@FlakyTest
@Test
override fun visibleWindowsShownMoreThanOneConsecutiveEntry() {
super.visibleWindowsShownMoreThanOneConsecutiveEntry()
}
@FlakyTest
@Test
override fun focusChanges() {
super.focusChanges()
}
@FlakyTest
@Test
override fun appWindowAsTopWindowAtEnd() {
super.appWindowAsTopWindowAtEnd()
}
}

View File

@@ -16,7 +16,6 @@
package com.android.server.wm.flicker.launch
import android.platform.test.annotations.FlakyTest
import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.FlickerBuilder
import com.android.server.wm.flicker.FlickerTest
@@ -25,7 +24,6 @@ import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
import com.android.server.wm.flicker.rules.RemoveAllTasksButHomeRule
import com.android.server.wm.traces.common.service.PlatformConsts
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.junit.runners.Parameterized
@@ -77,103 +75,6 @@ class OpenAppColdFromIcon(flicker: FlickerTest) : OpenAppFromLauncherTransition(
teardown { testApp.exit(wmHelper) }
}
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun appWindowAsTopWindowAtEnd() = super.appWindowAsTopWindowAtEnd()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun appWindowReplacesLauncherAsTopWindow() =
super.appWindowReplacesLauncherAsTopWindow()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun appLayerBecomesVisible() = super.appLayerBecomesVisible()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun appLayerReplacesLauncher() = super.appLayerReplacesLauncher()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun appWindowBecomesTopWindow() = super.appWindowBecomesTopWindow()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun appWindowBecomesVisible() = super.appWindowBecomesVisible()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun entireScreenCovered() = super.entireScreenCovered()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028) @Test override fun focusChanges() = super.focusChanges()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun navBarLayerIsVisibleAtStartAndEnd() = super.navBarLayerIsVisibleAtStartAndEnd()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun taskBarLayerIsVisibleAtStartAndEnd() = super.taskBarLayerIsVisibleAtStartAndEnd()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun taskBarWindowIsAlwaysVisible() = super.taskBarWindowIsAlwaysVisible()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun navBarLayerPositionAtStartAndEnd() = super.navBarLayerPositionAtStartAndEnd()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun navBarWindowIsAlwaysVisible() = super.navBarWindowIsAlwaysVisible()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun statusBarLayerPositionAtStartAndEnd() = super.statusBarLayerPositionAtStartAndEnd()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun statusBarLayerIsVisibleAtStartAndEnd() =
super.statusBarLayerIsVisibleAtStartAndEnd()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun statusBarWindowIsAlwaysVisible() = super.statusBarWindowIsAlwaysVisible()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun visibleLayersShownMoreThanOneConsecutiveEntry() =
super.visibleLayersShownMoreThanOneConsecutiveEntry()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun visibleWindowsShownMoreThanOneConsecutiveEntry() =
super.visibleWindowsShownMoreThanOneConsecutiveEntry()
/** {@inheritDoc} */
@FlakyTest(bugId = 240916028)
@Test
override fun appWindowIsTopWindowAtEnd() = super.appWindowIsTopWindowAtEnd()
companion object {
/**
* Creates the test configurations.

View File

@@ -16,7 +16,6 @@
package com.android.server.wm.flicker.launch
import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Presubmit
import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.FlickerBuilder
@@ -70,11 +69,6 @@ open class OpenAppColdTest(flicker: FlickerTest) : OpenAppFromLauncherTransition
transitions { testApp.launchViaIntent(wmHelper) }
}
/** {@inheritDoc} */
@FlakyTest(bugId = 206753786)
@Test
override fun navBarLayerPositionAtStartAndEnd() = super.navBarLayerPositionAtStartAndEnd()
/** {@inheritDoc} */
@Presubmit @Test override fun appLayerReplacesLauncher() = super.appLayerReplacesLauncher()

View File

@@ -112,9 +112,6 @@ open class OpenAppFromLockNotificationCold(flicker: FlickerTest) :
@Ignore("Not applicable to this CUJ. Display starts locked and app is full screen at the end")
override fun navBarWindowIsAlwaysVisible() {}
/** {@inheritDoc} */
@Postsubmit @Test override fun appWindowBecomesVisible() = super.appWindowBecomesVisible()
/** {@inheritDoc} */
@Postsubmit
@Test

View File

@@ -61,9 +61,9 @@ open class OpenAppFromNotificationCold(flicker: FlickerTest) :
}
}
@Postsubmit @Test override fun appWindowBecomesVisible() = appWindowBecomesVisible_coldStart()
@Presubmit @Test override fun appWindowBecomesVisible() = appWindowBecomesVisible_coldStart()
@Postsubmit @Test override fun appLayerBecomesVisible() = appLayerBecomesVisible_coldStart()
@Presubmit @Test override fun appLayerBecomesVisible() = appLayerBecomesVisible_coldStart()
/** {@inheritDoc} */
@Test

View File

@@ -16,7 +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.Presubmit
import android.view.WindowInsets
@@ -112,9 +111,9 @@ open class OpenAppFromNotificationWarm(flicker: FlickerTest) : OpenAppTransition
teardown { testApp.exit(wmHelper) }
}
@FlakyTest @Test override fun appWindowBecomesVisible() = appWindowBecomesVisible_warmStart()
@Presubmit @Test override fun appWindowBecomesVisible() = appWindowBecomesVisible_warmStart()
@Postsubmit @Test override fun appLayerBecomesVisible() = appLayerBecomesVisible_warmStart()
@Presubmit @Test override fun appLayerBecomesVisible() = appLayerBecomesVisible_warmStart()
@Presubmit
@Test

View File

@@ -86,9 +86,6 @@ open class OpenAppFromOverviewTest(flicker: FlickerTest) : OpenAppFromLauncherTr
}
}
/** {@inheritDoc} */
@Presubmit @Test override fun appLayerReplacesLauncher() = super.appLayerReplacesLauncher()
/** {@inheritDoc} */
@FlakyTest
@Test

View File

@@ -78,9 +78,6 @@ open class OpenAppWarmTest(flicker: FlickerTest) : OpenAppFromLauncherTransition
@Test
override fun navBarLayerPositionAtStartAndEnd() = super.navBarLayerPositionAtStartAndEnd()
/** {@inheritDoc} */
@Presubmit @Test override fun appLayerReplacesLauncher() = super.appLayerReplacesLauncher()
/** {@inheritDoc} */
@Presubmit
@Test

View File

@@ -20,7 +20,6 @@ import android.app.Instrumentation
import android.app.WallpaperManager
import android.content.res.Resources
import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.BaseTest
@@ -92,7 +91,7 @@ class TaskTransitionTest(flicker: FlickerTest) : BaseTest(flicker) {
* Checks that the [wallpaper] layer is never visible when performing task transitions. A solid
* color background should be shown instead.
*/
@FlakyTest(bugId = 253617416)
@Presubmit
@Test
fun wallpaperLayerIsNeverVisible() {
flicker.assertLayers {
@@ -192,7 +191,7 @@ class TaskTransitionTest(flicker: FlickerTest) : BaseTest(flicker) {
* Checks that we start with the LaunchNewTask activity on top and then open up the
* SimpleActivity and then go back to the LaunchNewTask activity.
*/
@Postsubmit
@Presubmit
@Test
fun newTaskOpensOnTopAndThenCloses() {
flicker.assertWm {
@@ -208,11 +207,6 @@ class TaskTransitionTest(flicker: FlickerTest) : BaseTest(flicker) {
}
}
/** {@inheritDoc} */
@Postsubmit
@Test
override fun navBarLayerPositionAtStartAndEnd() = super.navBarLayerPositionAtStartAndEnd()
companion object {
private fun getWallpaperPackage(instrumentation: Instrumentation): IComponentMatcher {
val wallpaperManager = WallpaperManager.getInstance(instrumentation.targetContext)