Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0de283ef authored by Vania Desmonda's avatar Vania Desmonda
Browse files

Create new @RequiresDesktopDevice annotation.

and annotate all desktop mode functional and Flicker tests with the new
annotation so that we can selectively run these tests on the test infra
at the config level.

Fixes: 434865938
Flag: EXEMPT test refactoring
Test: EXEMPT adding test annotation
Change-Id: I9180cc4ebcd7473ee4c5d2342d83ec3f886722af
parent 21029c9b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -16,13 +16,13 @@

package com.android.wm.shell.flicker

import android.platform.test.annotations.RequiresDesktopDevice
import android.tools.NavBar
import android.tools.flicker.FlickerBuilder
import android.tools.flicker.FlickerTest
import android.tools.flicker.FlickerTestFactory
import android.tools.flicker.assertions.FlickerChecker
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import androidx.test.filters.RequiresDevice
import com.android.wm.shell.Utils
import com.android.wm.shell.flicker.utils.appWindowInsideDisplayBoundsAtEnd
import com.android.wm.shell.flicker.utils.appWindowOnTopAtEnd
@@ -45,7 +45,7 @@ import org.junit.runners.Parameterized
 *
 *  The tests assert that the Clock application is the top-most window before the Alt-Tab switch.
 */
@RequiresDevice
@RequiresDesktopDevice
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
class AltTabSwitchToUnminimizeInDesktopModeFlickerTest(flicker: FlickerTest) :
+2 −2
Original line number Diff line number Diff line
@@ -16,13 +16,13 @@

package com.android.wm.shell.flicker

import android.platform.test.annotations.RequiresDesktopDevice
import android.tools.flicker.FlickerConfig
import android.tools.flicker.annotation.ExpectedScenarios
import android.tools.flicker.annotation.FlickerConfigProvider
import android.tools.flicker.config.FlickerConfig
import android.tools.flicker.config.FlickerServiceConfig
import android.tools.flicker.junit.FlickerServiceJUnit4ClassRunner
import androidx.test.filters.RequiresDevice
import com.android.wm.shell.flicker.DesktopModeFlickerScenarios.Companion.OPEN_UNLIMITED_APPS
import com.android.wm.shell.scenarios.OpenUnlimitedApps
import org.junit.Test
@@ -33,7 +33,7 @@ import org.junit.runner.RunWith
 *
 * Assert that the desktop task limit is not triggered.
 */
@RequiresDevice
@RequiresDesktopDevice
@RunWith(FlickerServiceJUnit4ClassRunner::class)
class OpenUnlimitedApps : OpenUnlimitedApps() {
    @ExpectedScenarios(["OPEN_UNLIMITED_APPS"])
+2 −2
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

package com.android.wm.shell.flicker.externaldisplay

import androidx.test.filters.RequiresDevice
import android.platform.test.annotations.RequiresDesktopDevice
import android.tools.NavBar
import android.tools.flicker.assertions.FlickerChecker
import android.tools.flicker.junit.FlickerParametersRunnerFactory
@@ -44,7 +44,7 @@ import org.junit.runners.Parameterized
 * stable display bounds.
 */

@RequiresDevice
@RequiresDesktopDevice
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
class MaximizeAppWindowWithDragToTopDragZoneInDesktopFirstFlickerTest(flicker: FlickerTest) :
+2 −2
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

package com.android.wm.shell.flicker.externaldisplay

import androidx.test.filters.RequiresDevice
import android.platform.test.annotations.RequiresDesktopDevice
import android.tools.NavBar
import android.tools.flicker.assertions.FlickerChecker
import android.tools.flicker.junit.FlickerParametersRunnerFactory
@@ -43,7 +43,7 @@ import org.junit.runners.Parameterized
 * Assert that the app launches in desktop mode.
 */

@RequiresDevice
@RequiresDesktopDevice
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
class OpenAppWithExternalDisplayConnectedFlickerTest(flicker: FlickerTest) :
+2 −2
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

package com.android.wm.shell.flicker.fundamentals

import androidx.test.filters.RequiresDevice
import android.platform.test.annotations.RequiresDesktopDevice
import android.tools.NavBar
import android.tools.flicker.junit.FlickerParametersRunnerFactory
import android.tools.flicker.FlickerBuilder
@@ -39,7 +39,7 @@ import org.junit.runners.Parameterized
 *
 * To run this test: atest CloseAllAppsViaAppHeaderExitTest
 */
@RequiresDevice
@RequiresDesktopDevice
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
class CloseAllAppsViaAppHeaderExitTest(flicker: FlickerTest) : DesktopModeBaseTest(flicker) {
Loading