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

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

Merge changes from topic "switch_bubbles" into main

* changes:
  Move nav parameters to tests
  Verify switch between bubbles
parents ba653901 de499f5c
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ test_module_config {
        "com.android.wm.shell.flicker.bubbles.ExpandBubbleWithImeViaBubbleBarTest",
        "com.android.wm.shell.flicker.bubbles.LaunchMultipleBubbleTest",
        "com.android.wm.shell.flicker.bubbles.ScrollableBubbleAppTest",
        "com.android.wm.shell.flicker.bubbles.SwitchBetweenBubblesTest",
    ],
}

@@ -146,3 +147,10 @@ test_module_config {
    test_suites: ["device-tests"],
    include_filters: ["com.android.wm.shell.flicker.bubbles.ScrollableBubbleAppTest"],
}

test_module_config {
    name: "WMShellExplicitFlickerTestsBubbles-SwitchBetweenBubblesTest",
    base: "WMShellExplicitFlickerTestsBubbles",
    test_suites: ["device-tests"],
    include_filters: ["com.android.wm.shell.flicker.bubbles.SwitchBetweenBubblesTest"],
}
+3 −0
Original line number Diff line number Diff line
@@ -44,6 +44,9 @@
    },
    {
      "name": "WMShellExplicitFlickerTestsBubbles-ScrollableBubbleAppTest"
    },
    {
      "name": "WMShellExplicitFlickerTestsBubbles-SwitchBetweenBubblesTest"
    }
  ]
}
+7 −0
Original line number Diff line number Diff line
@@ -36,7 +36,9 @@ import org.junit.Before
import org.junit.FixMethodOrder
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.junit.runners.Parameterized

/**
 * Test clicking bubble to expand a bubble that was in collapsed state.
@@ -62,6 +64,7 @@ import org.junit.runners.MethodSorters
@RequiresDevice
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@Presubmit
@RunWith(Parameterized::class)
class BubbleBarMovesTest(navBar: NavBar) : BubbleFlickerTestBase(), ExpandBubbleTestCases {
    companion object : FlickerPropertyInitializer() {

@@ -85,6 +88,10 @@ class BubbleBarMovesTest(navBar: NavBar) : BubbleFlickerTestBase(), ExpandBubble
            },
            tearDownAfterTransition = { testApp.exit(wmHelper) }
        )

        @Parameterized.Parameters(name = "{0}")
        @JvmStatic
        fun data(): List<NavBar> = listOf(NavBar.MODE_GESTURAL, NavBar.MODE_3BUTTON)
    }

    @get:Rule
+1 −6
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ import org.junit.runners.Parameterized
 * - System Bars tests: checks the visibility of navigation and status bar
 * - Verify all tests with both gestural and 3-button navigation mode
 */
@RunWith(Parameterized::class)
abstract class BubbleFlickerTestBase : BubbleFlickerSubjects {

    @get:Rule
@@ -262,9 +261,5 @@ abstract class BubbleFlickerTestBase : BubbleFlickerSubjects {

// endregion

    companion object : FlickerPropertyInitializer() {
        @Parameterized.Parameters(name = "{0}")
        @JvmStatic
        fun data(): List<NavBar> = listOf(NavBar.MODE_GESTURAL, NavBar.MODE_3BUTTON)
    }
    companion object : FlickerPropertyInitializer()
}
 No newline at end of file
+7 −0
Original line number Diff line number Diff line
@@ -30,7 +30,9 @@ import com.android.wm.shell.flicker.bubbles.utils.FlickerPropertyInitializer
import com.android.wm.shell.flicker.bubbles.utils.RecordTraceWithTransitionRule
import org.junit.FixMethodOrder
import org.junit.Rule
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.junit.runners.Parameterized

/**
 * Test collapse bubble app via clicking back key.
@@ -55,6 +57,7 @@ import org.junit.runners.MethodSorters
@RequiresDevice
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@Presubmit
@RunWith(Parameterized::class)
class CollapseBubbleAppViaBackTest(navBar: NavBar) : BubbleFlickerTestBase(),
    CollapseBubbleAppTestCases
{
@@ -64,6 +67,10 @@ class CollapseBubbleAppViaBackTest(navBar: NavBar) : BubbleFlickerTestBase(),
            transition = { collapseBubbleAppViaBackKey(testApp, tapl, wmHelper) },
            tearDownAfterTransition = { testApp.exit(wmHelper) }
        )

        @Parameterized.Parameters(name = "{0}")
        @JvmStatic
        fun data(): List<NavBar> = listOf(NavBar.MODE_GESTURAL, NavBar.MODE_3BUTTON)
    }

    @get:Rule
Loading