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

Commit 26bd6785 authored by Charles Chen's avatar Charles Chen Committed by Android (Google) Code Review
Browse files

Merge "Verify enter and expand bubble with IME" into main

parents 3dd873f5 48c858af
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -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"],
}
+7 −1
Original line number Diff line number Diff line
@@ -12,8 +12,14 @@
    {
      "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaBubbleMenuTest"
    },
    {
      "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleWithImeViaBubbleMenuTest"
    },
    {
      "name": "WMShellExplicitFlickerTestsBubbles-ExpandBubbleViaBubbleStackTest"
    },
    {
      "name": "WMShellExplicitFlickerTestsBubbles-ExpandBubbleWithImeViaBubbleBarTest"
    }
  ]
}
+22 −1
Original line number Diff line number Diff line
@@ -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
@@ -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

    /**
@@ -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
+9 −9
Original line number Diff line number Diff line
@@ -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
@@ -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)
@@ -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() {
@@ -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) }
        )
    }
+6 −6
Original line number Diff line number Diff line
@@ -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
@@ -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]
@@ -66,7 +67,6 @@ class DismissExpandedBubbleViaBubbleViewTest :
    BubbleFlickerTestBase(),
    BubbleAppBecomesNotExpandedTestCases
{

    companion object : FlickerPropertyInitializer() {

        @ClassRule
@@ -76,7 +76,7 @@ class DismissExpandedBubbleViaBubbleViewTest :
                setUpBeforeTransition(instrumentation, wmHelper)
                launchBubbleViaBubbleMenu(testApp, tapl, wmHelper)
            },
            transition = { dismissBubbleViaBubbleView(uiDevice, wmHelper) }
            transition = { dismissBubbleAppViaBubbleView(uiDevice, wmHelper) }
        )
    }

Loading