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

Commit 31733f09 authored by Pablo Gamito's avatar Pablo Gamito Committed by An An Yu
Browse files

Create WM Shell Flicker helper library

So that Flicker tests in other places can make use of the Splitscreen utils and avoid copying the utils all over the place.

Test: atest WMShellFlickerServiceTests WMShellFlickerTestsSplitScreen
Bug: 238043427
Change-Id: I5db19729c3968aba66dc3dfce1f3eafe9f1a0972
(cherry picked from commit 73058b51)
Merged-In: I5db19729c3968aba66dc3dfce1f3eafe9f1a0972
parent f3b13f10
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -23,6 +23,11 @@ package {
    default_applicable_licenses: ["frameworks_base_license"],
}

filegroup {
    name: "WMShellFlickerTestsUtils-src",
    srcs: ["src/com/android/wm/shell/flicker/utils/*.kt"],
}

filegroup {
    name: "WMShellFlickerTestsBase-src",
    srcs: ["src/com/android/wm/shell/flicker/*.kt"],
@@ -53,6 +58,28 @@ filegroup {
    ],
}

java_library {
    name: "wm-shell-flicker-utils",
    platform_apis: true,
    optimize: {
        enabled: false,
    },
    srcs: [
        ":WMShellFlickerTestsUtils-src",
    ],
    static_libs: [
        "androidx.test.ext.junit",
        "flickertestapplib",
        "flickerlib",
        "flickerlib-helpers",
        "platform-test-annotations",
        "wm-flicker-common-app-helpers",
        "wm-flicker-common-assertions",
        "launcher-helper-lib",
        "launcher-aosp-tapl",
    ],
}

java_defaults {
    name: "WMShellFlickerTestsDefault",
    manifest: "manifests/AndroidManifest.xml",
@@ -65,6 +92,7 @@ java_defaults {
    test_suites: ["device-tests"],
    libs: ["android.test.runner"],
    static_libs: [
        "wm-shell-flicker-utils",
        "androidx.test.ext.junit",
        "flickertestapplib",
        "flickerlib",
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.tools.common.traces.component.ComponentNameMatcher
import android.tools.device.flicker.legacy.LegacyFlickerTest
import androidx.test.platform.app.InstrumentationRegistry
import com.android.launcher3.tapl.LauncherInstrumentation
import com.android.wm.shell.flicker.utils.ICommonAssertions

/**
 * Base test class containing common assertions for [ComponentNameMatcher.NAV_BAR],
+4 −4
Original line number Diff line number Diff line
@@ -24,10 +24,10 @@ import android.tools.device.flicker.legacy.LegacyFlickerTest
import com.android.server.wm.flicker.helpers.LetterboxAppHelper
import com.android.server.wm.flicker.helpers.setRotation
import com.android.wm.shell.flicker.BaseTest
import com.android.wm.shell.flicker.appWindowIsVisibleAtEnd
import com.android.wm.shell.flicker.appWindowIsVisibleAtStart
import com.android.wm.shell.flicker.appWindowKeepVisible
import com.android.wm.shell.flicker.layerKeepVisible
import com.android.wm.shell.flicker.utils.appWindowIsVisibleAtEnd
import com.android.wm.shell.flicker.utils.appWindowIsVisibleAtStart
import com.android.wm.shell.flicker.utils.appWindowKeepVisible
import com.android.wm.shell.flicker.utils.layerKeepVisible

import org.junit.Assume
import org.junit.Before
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ import android.tools.device.traces.parsers.toFlickerComponent
import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.helpers.SimpleAppHelper
import com.android.server.wm.flicker.testapp.ActivityOptions
import com.android.wm.shell.flicker.SplitScreenUtils
import com.android.wm.shell.flicker.utils.SplitScreenUtils
import org.junit.Assume
import org.junit.FixMethodOrder
import org.junit.Test
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
import androidx.test.filters.RequiresDevice
import com.android.wm.shell.flicker.Direction
import com.android.wm.shell.flicker.utils.Direction
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
Loading