Loading libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/Android.bp +14 −0 Original line number Diff line number Diff line Loading @@ -80,9 +80,23 @@ test_module_config { test_suites: ["device-tests"], } test_module_config { name: "WMShellExplicitFlickerTestsBubbles-EnterBubbleWithImeViaBubbleMenuTest", base: "WMShellExplicitFlickerTestsBubbles", include_filters: ["com.android.wm.shell.flicker.bubbles.EnterBubbleWithImeViaBubbleMenuTest"], test_suites: ["device-tests"], } test_module_config { name: "WMShellExplicitFlickerTestsBubbles-ExpandBubbleViaBubbleStackTest", base: "WMShellExplicitFlickerTestsBubbles", include_filters: ["com.android.wm.shell.flicker.bubbles.ExpandBubbleViaBubbleStackTest"], test_suites: ["device-tests"], } test_module_config { name: "WMShellExplicitFlickerTestsBubbles-ExpandBubbleWithImeViaBubbleBarTest", base: "WMShellExplicitFlickerTestsBubbles", include_filters: ["com.android.wm.shell.flicker.bubbles.ExpandBubbleWithImeViaBubbleBarTest"], test_suites: ["device-tests"], } libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/TEST_MAPPING +7 −1 Original line number Diff line number Diff line Loading @@ -12,8 +12,14 @@ { "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaBubbleMenuTest" }, { "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleWithImeViaBubbleMenuTest" }, { "name": "WMShellExplicitFlickerTestsBubbles-ExpandBubbleViaBubbleStackTest" }, { "name": "WMShellExplicitFlickerTestsBubbles-ExpandBubbleWithImeViaBubbleBarTest" } ] } libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/BubbleFlickerTestBase.kt +22 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.wm.shell.flicker.bubbles import android.platform.test.flag.junit.CheckFlagsRule import android.platform.test.flag.junit.DeviceFlagsValueProvider import android.tools.Tag import android.tools.device.apphelpers.StandardAppHelper import android.tools.flicker.assertions.SubjectsParser import android.tools.flicker.subject.events.EventLogSubject import android.tools.flicker.subject.layers.LayerTraceEntrySubject Loading Loading @@ -103,7 +104,12 @@ abstract class BubbleFlickerTestBase : BubbleFlickerSubjects { */ override val isGesturalNavBar = tapl.navigationModel == NavigationModel.ZERO_BUTTON override val testApp /** * The test app to verify. * * Note that it's necessary to override this `testApp` if the test use [SimpleAppHelper]. */ override val testApp: StandardAppHelper get() = BubbleFlickerTestBase.testApp /** Loading Loading @@ -145,6 +151,21 @@ abstract class BubbleFlickerTestBase : BubbleFlickerSubjects { .forAllEntries() } /** * Verifies if the stack space of all displays is fully covered by any visible * layer, during the whole transitions. */ @Test fun entireScreenCovered() { layersTraceSubject.invoke("entireScreenCovered") { entry -> entry.entry.displays .filter { it.isOn } .forEach { display -> entry.visibleRegion().coversAtLeast(display.layerStackSpace) } } } // endregion // region Launcher visibility tests Loading libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/CollapseBubbleViaBackTest.kt→libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/CollapseBubbleAppViaBackTest.kt +9 −9 Original line number Diff line number Diff line Loading @@ -21,11 +21,11 @@ import androidx.test.filters.RequiresDevice import android.platform.test.annotations.RequiresFlagsEnabled import androidx.test.ext.junit.runners.AndroidJUnit4 import com.android.wm.shell.Flags import com.android.wm.shell.flicker.bubbles.testcase.BubbleStackAlwaysVisibleTestCases import com.android.wm.shell.flicker.bubbles.testcase.BubbleAppBecomesNotExpandedTestCases import com.android.wm.shell.flicker.bubbles.testcase.BubbleAlwaysVisibleTestCases import com.android.wm.shell.flicker.bubbles.utils.FlickerPropertyInitializer import com.android.wm.shell.flicker.bubbles.utils.RecordTraceWithTransitionRule import com.android.wm.shell.flicker.bubbles.utils.collapseBubbleViaBackKey import com.android.wm.shell.flicker.bubbles.utils.collapseBubbleAppViaBackKey import com.android.wm.shell.flicker.bubbles.utils.launchBubbleViaBubbleMenu import com.android.wm.shell.flicker.bubbles.utils.setUpBeforeTransition import org.junit.ClassRule Loading @@ -35,23 +35,23 @@ import org.junit.runner.RunWith import org.junit.runners.MethodSorters /** * Test collapse bubble via clicking back key. * Test collapse bubble app via clicking back key. * * To run this test: `atest WMShellExplicitFlickerTestsBubbles:CollapseBubbleViaBackTest` * * Pre-steps: * ``` * Launch [simpleApp] into bubble * Launch [testApp] into bubble * ``` * * Actions: * ``` * Collapse bubble via back key * Collapse bubbled [testApp] via back key * ``` * * Verified tests: * - [BubbleFlickerTestBase] * - [BubbleStackAlwaysVisibleTestCases] * - [BubbleAlwaysVisibleTestCases] * - [BubbleAppBecomesNotExpandedTestCases] */ @RequiresFlagsEnabled(Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE) Loading @@ -59,9 +59,9 @@ import org.junit.runners.MethodSorters @RequiresDevice @FixMethodOrder(MethodSorters.NAME_ASCENDING) @Presubmit class CollapseBubbleViaBackTest : class CollapseBubbleAppViaBackTest : BubbleFlickerTestBase(), BubbleStackAlwaysVisibleTestCases, BubbleAlwaysVisibleTestCases, BubbleAppBecomesNotExpandedTestCases { companion object : FlickerPropertyInitializer() { Loading @@ -73,7 +73,7 @@ class CollapseBubbleViaBackTest : setUpBeforeTransition(instrumentation, wmHelper) launchBubbleViaBubbleMenu(testApp, tapl, wmHelper) }, transition = { collapseBubbleViaBackKey(testApp, tapl, wmHelper) }, transition = { collapseBubbleAppViaBackKey(testApp, tapl, wmHelper) }, tearDownAfterTransition = { testApp.exit(wmHelper) } ) } Loading libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/DismissExpandedBubbleViaBubbleViewTest.kt +6 −6 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ import com.android.wm.shell.Flags import com.android.wm.shell.flicker.bubbles.testcase.BubbleAppBecomesNotExpandedTestCases import com.android.wm.shell.flicker.bubbles.utils.FlickerPropertyInitializer import com.android.wm.shell.flicker.bubbles.utils.RecordTraceWithTransitionRule import com.android.wm.shell.flicker.bubbles.utils.dismissBubbleViaBubbleView import com.android.wm.shell.flicker.bubbles.utils.dismissBubbleAppViaBubbleView import com.android.wm.shell.flicker.bubbles.utils.launchBubbleViaBubbleMenu import com.android.wm.shell.flicker.bubbles.utils.setUpBeforeTransition import org.junit.Assume.assumeFalse Loading @@ -38,18 +38,19 @@ import org.junit.runner.RunWith import org.junit.runners.MethodSorters /** * Test dismiss bubble via dragging bubble to the dismiss view when the bubble is in expanded state. * Test dismiss bubble app via dragging bubble to the dismiss view when the bubble is in expanded * state. * * To run this test: `atest WMShellExplicitFlickerTestsBubbles:DismissExpandedBubbleTest` * * Pre-steps: * ``` * Launch [simpleApp] into bubble * Launch [testApp] into bubble * ``` * * Actions: * ``` * Dismiss bubble via dragging bubble icon to the dismiss view * Dismiss bubble app via dragging bubble icon to the dismiss view * ``` * Verified tests: * - [BubbleFlickerTestBase] Loading @@ -66,7 +67,6 @@ class DismissExpandedBubbleViaBubbleViewTest : BubbleFlickerTestBase(), BubbleAppBecomesNotExpandedTestCases { companion object : FlickerPropertyInitializer() { @ClassRule Loading @@ -76,7 +76,7 @@ class DismissExpandedBubbleViaBubbleViewTest : setUpBeforeTransition(instrumentation, wmHelper) launchBubbleViaBubbleMenu(testApp, tapl, wmHelper) }, transition = { dismissBubbleViaBubbleView(uiDevice, wmHelper) } transition = { dismissBubbleAppViaBubbleView(uiDevice, wmHelper) } ) } Loading Loading
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/Android.bp +14 −0 Original line number Diff line number Diff line Loading @@ -80,9 +80,23 @@ test_module_config { test_suites: ["device-tests"], } test_module_config { name: "WMShellExplicitFlickerTestsBubbles-EnterBubbleWithImeViaBubbleMenuTest", base: "WMShellExplicitFlickerTestsBubbles", include_filters: ["com.android.wm.shell.flicker.bubbles.EnterBubbleWithImeViaBubbleMenuTest"], test_suites: ["device-tests"], } test_module_config { name: "WMShellExplicitFlickerTestsBubbles-ExpandBubbleViaBubbleStackTest", base: "WMShellExplicitFlickerTestsBubbles", include_filters: ["com.android.wm.shell.flicker.bubbles.ExpandBubbleViaBubbleStackTest"], test_suites: ["device-tests"], } test_module_config { name: "WMShellExplicitFlickerTestsBubbles-ExpandBubbleWithImeViaBubbleBarTest", base: "WMShellExplicitFlickerTestsBubbles", include_filters: ["com.android.wm.shell.flicker.bubbles.ExpandBubbleWithImeViaBubbleBarTest"], test_suites: ["device-tests"], }
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/TEST_MAPPING +7 −1 Original line number Diff line number Diff line Loading @@ -12,8 +12,14 @@ { "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaBubbleMenuTest" }, { "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleWithImeViaBubbleMenuTest" }, { "name": "WMShellExplicitFlickerTestsBubbles-ExpandBubbleViaBubbleStackTest" }, { "name": "WMShellExplicitFlickerTestsBubbles-ExpandBubbleWithImeViaBubbleBarTest" } ] }
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/BubbleFlickerTestBase.kt +22 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.wm.shell.flicker.bubbles import android.platform.test.flag.junit.CheckFlagsRule import android.platform.test.flag.junit.DeviceFlagsValueProvider import android.tools.Tag import android.tools.device.apphelpers.StandardAppHelper import android.tools.flicker.assertions.SubjectsParser import android.tools.flicker.subject.events.EventLogSubject import android.tools.flicker.subject.layers.LayerTraceEntrySubject Loading Loading @@ -103,7 +104,12 @@ abstract class BubbleFlickerTestBase : BubbleFlickerSubjects { */ override val isGesturalNavBar = tapl.navigationModel == NavigationModel.ZERO_BUTTON override val testApp /** * The test app to verify. * * Note that it's necessary to override this `testApp` if the test use [SimpleAppHelper]. */ override val testApp: StandardAppHelper get() = BubbleFlickerTestBase.testApp /** Loading Loading @@ -145,6 +151,21 @@ abstract class BubbleFlickerTestBase : BubbleFlickerSubjects { .forAllEntries() } /** * Verifies if the stack space of all displays is fully covered by any visible * layer, during the whole transitions. */ @Test fun entireScreenCovered() { layersTraceSubject.invoke("entireScreenCovered") { entry -> entry.entry.displays .filter { it.isOn } .forEach { display -> entry.visibleRegion().coversAtLeast(display.layerStackSpace) } } } // endregion // region Launcher visibility tests Loading
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/CollapseBubbleViaBackTest.kt→libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/CollapseBubbleAppViaBackTest.kt +9 −9 Original line number Diff line number Diff line Loading @@ -21,11 +21,11 @@ import androidx.test.filters.RequiresDevice import android.platform.test.annotations.RequiresFlagsEnabled import androidx.test.ext.junit.runners.AndroidJUnit4 import com.android.wm.shell.Flags import com.android.wm.shell.flicker.bubbles.testcase.BubbleStackAlwaysVisibleTestCases import com.android.wm.shell.flicker.bubbles.testcase.BubbleAppBecomesNotExpandedTestCases import com.android.wm.shell.flicker.bubbles.testcase.BubbleAlwaysVisibleTestCases import com.android.wm.shell.flicker.bubbles.utils.FlickerPropertyInitializer import com.android.wm.shell.flicker.bubbles.utils.RecordTraceWithTransitionRule import com.android.wm.shell.flicker.bubbles.utils.collapseBubbleViaBackKey import com.android.wm.shell.flicker.bubbles.utils.collapseBubbleAppViaBackKey import com.android.wm.shell.flicker.bubbles.utils.launchBubbleViaBubbleMenu import com.android.wm.shell.flicker.bubbles.utils.setUpBeforeTransition import org.junit.ClassRule Loading @@ -35,23 +35,23 @@ import org.junit.runner.RunWith import org.junit.runners.MethodSorters /** * Test collapse bubble via clicking back key. * Test collapse bubble app via clicking back key. * * To run this test: `atest WMShellExplicitFlickerTestsBubbles:CollapseBubbleViaBackTest` * * Pre-steps: * ``` * Launch [simpleApp] into bubble * Launch [testApp] into bubble * ``` * * Actions: * ``` * Collapse bubble via back key * Collapse bubbled [testApp] via back key * ``` * * Verified tests: * - [BubbleFlickerTestBase] * - [BubbleStackAlwaysVisibleTestCases] * - [BubbleAlwaysVisibleTestCases] * - [BubbleAppBecomesNotExpandedTestCases] */ @RequiresFlagsEnabled(Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE) Loading @@ -59,9 +59,9 @@ import org.junit.runners.MethodSorters @RequiresDevice @FixMethodOrder(MethodSorters.NAME_ASCENDING) @Presubmit class CollapseBubbleViaBackTest : class CollapseBubbleAppViaBackTest : BubbleFlickerTestBase(), BubbleStackAlwaysVisibleTestCases, BubbleAlwaysVisibleTestCases, BubbleAppBecomesNotExpandedTestCases { companion object : FlickerPropertyInitializer() { Loading @@ -73,7 +73,7 @@ class CollapseBubbleViaBackTest : setUpBeforeTransition(instrumentation, wmHelper) launchBubbleViaBubbleMenu(testApp, tapl, wmHelper) }, transition = { collapseBubbleViaBackKey(testApp, tapl, wmHelper) }, transition = { collapseBubbleAppViaBackKey(testApp, tapl, wmHelper) }, tearDownAfterTransition = { testApp.exit(wmHelper) } ) } Loading
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/DismissExpandedBubbleViaBubbleViewTest.kt +6 −6 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ import com.android.wm.shell.Flags import com.android.wm.shell.flicker.bubbles.testcase.BubbleAppBecomesNotExpandedTestCases import com.android.wm.shell.flicker.bubbles.utils.FlickerPropertyInitializer import com.android.wm.shell.flicker.bubbles.utils.RecordTraceWithTransitionRule import com.android.wm.shell.flicker.bubbles.utils.dismissBubbleViaBubbleView import com.android.wm.shell.flicker.bubbles.utils.dismissBubbleAppViaBubbleView import com.android.wm.shell.flicker.bubbles.utils.launchBubbleViaBubbleMenu import com.android.wm.shell.flicker.bubbles.utils.setUpBeforeTransition import org.junit.Assume.assumeFalse Loading @@ -38,18 +38,19 @@ import org.junit.runner.RunWith import org.junit.runners.MethodSorters /** * Test dismiss bubble via dragging bubble to the dismiss view when the bubble is in expanded state. * Test dismiss bubble app via dragging bubble to the dismiss view when the bubble is in expanded * state. * * To run this test: `atest WMShellExplicitFlickerTestsBubbles:DismissExpandedBubbleTest` * * Pre-steps: * ``` * Launch [simpleApp] into bubble * Launch [testApp] into bubble * ``` * * Actions: * ``` * Dismiss bubble via dragging bubble icon to the dismiss view * Dismiss bubble app via dragging bubble icon to the dismiss view * ``` * Verified tests: * - [BubbleFlickerTestBase] Loading @@ -66,7 +67,6 @@ class DismissExpandedBubbleViaBubbleViewTest : BubbleFlickerTestBase(), BubbleAppBecomesNotExpandedTestCases { companion object : FlickerPropertyInitializer() { @ClassRule Loading @@ -76,7 +76,7 @@ class DismissExpandedBubbleViaBubbleViewTest : setUpBeforeTransition(instrumentation, wmHelper) launchBubbleViaBubbleMenu(testApp, tapl, wmHelper) }, transition = { dismissBubbleViaBubbleView(uiDevice, wmHelper) } transition = { dismissBubbleAppViaBubbleView(uiDevice, wmHelper) } ) } Loading