Loading libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/Android.bp +7 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,13 @@ test_module_config { include_filters: ["com.android.wm.shell.flicker.bubbles.EnterBubbleViaBubbleMenuTest"], } test_module_config { name: "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaDragToBubbleBarTest", base: "WMShellExplicitFlickerTestsBubbles", include_filters: ["com.android.wm.shell.flicker.bubbles.EnterBubbleViaDragToBubbleBarTest"], test_suites: ["device-tests"], } test_module_config { name: "WMShellExplicitFlickerTestsBubbles-EnterBubbleWithImeViaBubbleMenuTest", base: "WMShellExplicitFlickerTestsBubbles", Loading libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/TEST_MAPPING +3 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,9 @@ { "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaBubbleMenuTest" }, { "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaDragToBubbleBarTest" }, { "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleWithImeViaBubbleMenuTest" }, Loading libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/EnterBubbleViaBubbleMenuTest.kt +4 −54 Original line number Diff line number Diff line Loading @@ -19,11 +19,10 @@ package com.android.wm.shell.flicker.bubbles import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresFlagsEnabled import android.tools.NavBar import android.tools.traces.component.ComponentNameMatcher.Companion.BUBBLE import androidx.test.filters.RequiresDevice import com.android.wm.shell.Flags import com.android.wm.shell.Utils import com.android.wm.shell.flicker.bubbles.testcase.BubbleAppBecomesExpandedTestCases import com.android.wm.shell.flicker.bubbles.testcase.EnterBubbleTestCases import com.android.wm.shell.flicker.bubbles.utils.ApplyPerParameterRule import com.android.wm.shell.flicker.bubbles.utils.FlickerPropertyInitializer import com.android.wm.shell.flicker.bubbles.utils.RecordTraceWithTransitionRule Loading @@ -31,7 +30,6 @@ import com.android.wm.shell.flicker.bubbles.utils.launchBubbleViaBubbleMenu import com.android.wm.shell.flicker.bubbles.utils.setUpBeforeTransition import org.junit.FixMethodOrder import org.junit.Rule import org.junit.Test import org.junit.runners.MethodSorters /** Loading @@ -46,15 +44,14 @@ import org.junit.runners.MethodSorters * ``` * Verified tests: * - [BubbleFlickerTestBase] * - [BubbleAppBecomesExpandedTestCases] * - Bubble becomes visible * - [EnterBubbleTestCases] */ @RequiresFlagsEnabled(Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE) @RequiresDevice @FixMethodOrder(MethodSorters.NAME_ASCENDING) @Presubmit open class EnterBubbleViaBubbleMenuTest(navBar: NavBar) : BubbleFlickerTestBase(), BubbleAppBecomesExpandedTestCases { open class EnterBubbleViaBubbleMenuTest(navBar: NavBar) : BubbleFlickerTestBase(), EnterBubbleTestCases { companion object : FlickerPropertyInitializer() { private val recordTraceWithTransitionRule = RecordTraceWithTransitionRule( Loading @@ -72,51 +69,4 @@ open class EnterBubbleViaBubbleMenuTest(navBar: NavBar) : override val traceDataReader get() = recordTraceWithTransitionRule.reader // region Bubble related tests /** * Verifies the bubble window is visible at the end of transition. */ @Test fun bubbleWindowIsVisibleAtEnd() { wmStateSubjectAtEnd.isNonAppWindowVisible(BUBBLE) } /** * Verifies the bubble layer is visible at the end of transition. */ @Test fun bubbleLayerIsVisibleAtEnd() { layerTraceEntrySubjectAtEnd.isVisible(BUBBLE) } /** * Verifies the bubble window becomes visible. */ @Test fun bubbleWindowBecomesVisible() { wmTraceSubject // Bubble app window may not have been added to WM hierarchy at the start of the // transition. .isNonAppWindowInvisible(BUBBLE) .then() .isAboveAppWindowVisible(BUBBLE) .forAllEntries() } /** * Verifies the bubble layer becomes visible. */ @Test fun bubbleLayerBecomesVisible() { layersTraceSubject // Bubble may not appear at the start of the transition. .isInvisible(BUBBLE) .then() .isVisible(BUBBLE) .forAllEntries() } // endregion } No newline at end of file libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/EnterBubbleViaDragToBubbleBarTest.kt 0 → 100644 +106 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.wm.shell.flicker.bubbles import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresFlagsEnabled import android.tools.NavBar import android.tools.traces.component.ComponentNameMatcher.Companion.TASK_BAR import androidx.test.filters.FlakyTest import androidx.test.filters.RequiresDevice import com.android.wm.shell.Flags import com.android.wm.shell.Utils import com.android.wm.shell.flicker.bubbles.testcase.EnterBubbleTestCases import com.android.wm.shell.flicker.bubbles.utils.ApplyPerParameterRule 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.launchBubbleViaDragToBubbleBar import com.android.wm.shell.flicker.bubbles.utils.setUpBeforeTransition import com.android.wm.shell.flicker.utils.SplitScreenUtils import org.junit.Assume.assumeTrue import org.junit.Before import org.junit.FixMethodOrder import org.junit.Rule import org.junit.Test import org.junit.rules.TestRule import org.junit.runners.MethodSorters import org.junit.runners.Parameterized /** * Test entering bubble via dragging the [testApp] icon from task bar to bubble bar location. * * To run this test: `atest WMShellExplicitFlickerTestsBubbles:EnterBubbleViaDragToBubbleBarTest` * * Pre-steps: * ``` * Drag [testApp] icon to hotseat * ``` * Actions: * ``` * Switch to overview to show task bar. * Drag the [testApp] icon from task bar to bubble bar location. * ``` * Verified tests: * - [BubbleFlickerTestBase] * - [EnterBubbleTestCases] */ @RequiresFlagsEnabled(Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE, Flags.FLAG_ENABLE_BUBBLE_BAR) @RequiresDevice @FixMethodOrder(MethodSorters.NAME_ASCENDING) @Presubmit class EnterBubbleViaDragToBubbleBarTest(navBar: NavBar) : BubbleFlickerTestBase(), EnterBubbleTestCases { companion object : FlickerPropertyInitializer() { private val recordTraceWithTransitionRule = RecordTraceWithTransitionRule( setUpBeforeTransition = { setUpBeforeTransition(instrumentation, wmHelper) SplitScreenUtils.createShortcutOnHotseatIfNotExist(tapl, testApp.appName) }, transition = { launchBubbleViaDragToBubbleBar(testApp, tapl, wmHelper) }, tearDownAfterTransition = { testApp.exit(wmHelper) } ) // TODO(b/428566420): LauncherInstrumentation doesn't support to drag to bubble bar on 3 // button nav mode. @Parameterized.Parameters(name = "{0}") @JvmStatic fun data(): List<NavBar> = listOf(NavBar.MODE_GESTURAL) } @get:Rule val setUpRule: TestRule = ApplyPerParameterRule( Utils.testSetupRule(navBar).around(recordTraceWithTransitionRule), params = arrayOf(navBar) ) override val traceDataReader get() = recordTraceWithTransitionRule.reader @Before override fun setUp() { // Bubble and task bar are not available on phone. assumeTrue(tapl.isTablet) super.setUp() } @FlakyTest(bugId = 428630722) @Test override fun focusChanges() { eventLogSubject.focusChanges(TASK_BAR.toWindowName(), testApp.toWindowName()) } } No newline at end of file libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/EnterBubbleWithImeViaBubbleMenuTest.kt +5 −3 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import androidx.test.filters.RequiresDevice import com.android.server.wm.flicker.helpers.ImeShownOnAppStartHelper import com.android.wm.shell.Flags import com.android.wm.shell.Utils import com.android.wm.shell.flicker.bubbles.testcase.EnterBubbleTestCases import com.android.wm.shell.flicker.bubbles.testcase.ImeBecomesVisibleAndBubbleIsShrunkTestCase import com.android.wm.shell.flicker.bubbles.utils.ApplyPerParameterRule import com.android.wm.shell.flicker.bubbles.utils.FlickerPropertyInitializer Loading Loading @@ -55,6 +56,7 @@ import org.junit.runners.MethodSorters * IME will show after [ImeActivityAutoFocus] is shown. * ``` * Verified tests: * - [BubbleFlickerTestBase] * - [EnterBubbleViaBubbleMenuTest] * - [ImeBecomesVisibleAndBubbleIsShrunkTestCase] */ Loading @@ -62,8 +64,8 @@ import org.junit.runners.MethodSorters @RequiresDevice @FixMethodOrder(MethodSorters.NAME_ASCENDING) @Presubmit class EnterBubbleWithImeViaBubbleMenuTest(navBar: NavBar) : EnterBubbleViaBubbleMenuTest(navBar), ImeBecomesVisibleAndBubbleIsShrunkTestCase { class EnterBubbleWithImeViaBubbleMenuTest(navBar: NavBar) : BubbleFlickerTestBase(), EnterBubbleTestCases, ImeBecomesVisibleAndBubbleIsShrunkTestCase { companion object : FlickerPropertyInitializer() { /** Loading Loading @@ -94,7 +96,7 @@ class EnterBubbleWithImeViaBubbleMenuTest(navBar: NavBar) : } @get:Rule override val setUpRule = ApplyPerParameterRule( val setUpRule = ApplyPerParameterRule( Utils.testSetupRule(navBar).around(recordTraceWithTransitionRule), params = arrayOf(navBar) ) Loading Loading
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/Android.bp +7 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,13 @@ test_module_config { include_filters: ["com.android.wm.shell.flicker.bubbles.EnterBubbleViaBubbleMenuTest"], } test_module_config { name: "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaDragToBubbleBarTest", base: "WMShellExplicitFlickerTestsBubbles", include_filters: ["com.android.wm.shell.flicker.bubbles.EnterBubbleViaDragToBubbleBarTest"], test_suites: ["device-tests"], } test_module_config { name: "WMShellExplicitFlickerTestsBubbles-EnterBubbleWithImeViaBubbleMenuTest", base: "WMShellExplicitFlickerTestsBubbles", Loading
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/TEST_MAPPING +3 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,9 @@ { "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaBubbleMenuTest" }, { "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleViaDragToBubbleBarTest" }, { "name": "WMShellExplicitFlickerTestsBubbles-EnterBubbleWithImeViaBubbleMenuTest" }, Loading
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/EnterBubbleViaBubbleMenuTest.kt +4 −54 Original line number Diff line number Diff line Loading @@ -19,11 +19,10 @@ package com.android.wm.shell.flicker.bubbles import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresFlagsEnabled import android.tools.NavBar import android.tools.traces.component.ComponentNameMatcher.Companion.BUBBLE import androidx.test.filters.RequiresDevice import com.android.wm.shell.Flags import com.android.wm.shell.Utils import com.android.wm.shell.flicker.bubbles.testcase.BubbleAppBecomesExpandedTestCases import com.android.wm.shell.flicker.bubbles.testcase.EnterBubbleTestCases import com.android.wm.shell.flicker.bubbles.utils.ApplyPerParameterRule import com.android.wm.shell.flicker.bubbles.utils.FlickerPropertyInitializer import com.android.wm.shell.flicker.bubbles.utils.RecordTraceWithTransitionRule Loading @@ -31,7 +30,6 @@ import com.android.wm.shell.flicker.bubbles.utils.launchBubbleViaBubbleMenu import com.android.wm.shell.flicker.bubbles.utils.setUpBeforeTransition import org.junit.FixMethodOrder import org.junit.Rule import org.junit.Test import org.junit.runners.MethodSorters /** Loading @@ -46,15 +44,14 @@ import org.junit.runners.MethodSorters * ``` * Verified tests: * - [BubbleFlickerTestBase] * - [BubbleAppBecomesExpandedTestCases] * - Bubble becomes visible * - [EnterBubbleTestCases] */ @RequiresFlagsEnabled(Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE) @RequiresDevice @FixMethodOrder(MethodSorters.NAME_ASCENDING) @Presubmit open class EnterBubbleViaBubbleMenuTest(navBar: NavBar) : BubbleFlickerTestBase(), BubbleAppBecomesExpandedTestCases { open class EnterBubbleViaBubbleMenuTest(navBar: NavBar) : BubbleFlickerTestBase(), EnterBubbleTestCases { companion object : FlickerPropertyInitializer() { private val recordTraceWithTransitionRule = RecordTraceWithTransitionRule( Loading @@ -72,51 +69,4 @@ open class EnterBubbleViaBubbleMenuTest(navBar: NavBar) : override val traceDataReader get() = recordTraceWithTransitionRule.reader // region Bubble related tests /** * Verifies the bubble window is visible at the end of transition. */ @Test fun bubbleWindowIsVisibleAtEnd() { wmStateSubjectAtEnd.isNonAppWindowVisible(BUBBLE) } /** * Verifies the bubble layer is visible at the end of transition. */ @Test fun bubbleLayerIsVisibleAtEnd() { layerTraceEntrySubjectAtEnd.isVisible(BUBBLE) } /** * Verifies the bubble window becomes visible. */ @Test fun bubbleWindowBecomesVisible() { wmTraceSubject // Bubble app window may not have been added to WM hierarchy at the start of the // transition. .isNonAppWindowInvisible(BUBBLE) .then() .isAboveAppWindowVisible(BUBBLE) .forAllEntries() } /** * Verifies the bubble layer becomes visible. */ @Test fun bubbleLayerBecomesVisible() { layersTraceSubject // Bubble may not appear at the start of the transition. .isInvisible(BUBBLE) .then() .isVisible(BUBBLE) .forAllEntries() } // endregion } No newline at end of file
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/EnterBubbleViaDragToBubbleBarTest.kt 0 → 100644 +106 −0 Original line number Diff line number Diff line /* * Copyright (C) 2025 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.wm.shell.flicker.bubbles import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresFlagsEnabled import android.tools.NavBar import android.tools.traces.component.ComponentNameMatcher.Companion.TASK_BAR import androidx.test.filters.FlakyTest import androidx.test.filters.RequiresDevice import com.android.wm.shell.Flags import com.android.wm.shell.Utils import com.android.wm.shell.flicker.bubbles.testcase.EnterBubbleTestCases import com.android.wm.shell.flicker.bubbles.utils.ApplyPerParameterRule 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.launchBubbleViaDragToBubbleBar import com.android.wm.shell.flicker.bubbles.utils.setUpBeforeTransition import com.android.wm.shell.flicker.utils.SplitScreenUtils import org.junit.Assume.assumeTrue import org.junit.Before import org.junit.FixMethodOrder import org.junit.Rule import org.junit.Test import org.junit.rules.TestRule import org.junit.runners.MethodSorters import org.junit.runners.Parameterized /** * Test entering bubble via dragging the [testApp] icon from task bar to bubble bar location. * * To run this test: `atest WMShellExplicitFlickerTestsBubbles:EnterBubbleViaDragToBubbleBarTest` * * Pre-steps: * ``` * Drag [testApp] icon to hotseat * ``` * Actions: * ``` * Switch to overview to show task bar. * Drag the [testApp] icon from task bar to bubble bar location. * ``` * Verified tests: * - [BubbleFlickerTestBase] * - [EnterBubbleTestCases] */ @RequiresFlagsEnabled(Flags.FLAG_ENABLE_CREATE_ANY_BUBBLE, Flags.FLAG_ENABLE_BUBBLE_BAR) @RequiresDevice @FixMethodOrder(MethodSorters.NAME_ASCENDING) @Presubmit class EnterBubbleViaDragToBubbleBarTest(navBar: NavBar) : BubbleFlickerTestBase(), EnterBubbleTestCases { companion object : FlickerPropertyInitializer() { private val recordTraceWithTransitionRule = RecordTraceWithTransitionRule( setUpBeforeTransition = { setUpBeforeTransition(instrumentation, wmHelper) SplitScreenUtils.createShortcutOnHotseatIfNotExist(tapl, testApp.appName) }, transition = { launchBubbleViaDragToBubbleBar(testApp, tapl, wmHelper) }, tearDownAfterTransition = { testApp.exit(wmHelper) } ) // TODO(b/428566420): LauncherInstrumentation doesn't support to drag to bubble bar on 3 // button nav mode. @Parameterized.Parameters(name = "{0}") @JvmStatic fun data(): List<NavBar> = listOf(NavBar.MODE_GESTURAL) } @get:Rule val setUpRule: TestRule = ApplyPerParameterRule( Utils.testSetupRule(navBar).around(recordTraceWithTransitionRule), params = arrayOf(navBar) ) override val traceDataReader get() = recordTraceWithTransitionRule.reader @Before override fun setUp() { // Bubble and task bar are not available on phone. assumeTrue(tapl.isTablet) super.setUp() } @FlakyTest(bugId = 428630722) @Test override fun focusChanges() { eventLogSubject.focusChanges(TASK_BAR.toWindowName(), testApp.toWindowName()) } } No newline at end of file
libs/WindowManager/Shell/tests/e2e/bubbles/flicker-explicit/src/com/android/wm/shell/flicker/bubbles/EnterBubbleWithImeViaBubbleMenuTest.kt +5 −3 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import androidx.test.filters.RequiresDevice import com.android.server.wm.flicker.helpers.ImeShownOnAppStartHelper import com.android.wm.shell.Flags import com.android.wm.shell.Utils import com.android.wm.shell.flicker.bubbles.testcase.EnterBubbleTestCases import com.android.wm.shell.flicker.bubbles.testcase.ImeBecomesVisibleAndBubbleIsShrunkTestCase import com.android.wm.shell.flicker.bubbles.utils.ApplyPerParameterRule import com.android.wm.shell.flicker.bubbles.utils.FlickerPropertyInitializer Loading Loading @@ -55,6 +56,7 @@ import org.junit.runners.MethodSorters * IME will show after [ImeActivityAutoFocus] is shown. * ``` * Verified tests: * - [BubbleFlickerTestBase] * - [EnterBubbleViaBubbleMenuTest] * - [ImeBecomesVisibleAndBubbleIsShrunkTestCase] */ Loading @@ -62,8 +64,8 @@ import org.junit.runners.MethodSorters @RequiresDevice @FixMethodOrder(MethodSorters.NAME_ASCENDING) @Presubmit class EnterBubbleWithImeViaBubbleMenuTest(navBar: NavBar) : EnterBubbleViaBubbleMenuTest(navBar), ImeBecomesVisibleAndBubbleIsShrunkTestCase { class EnterBubbleWithImeViaBubbleMenuTest(navBar: NavBar) : BubbleFlickerTestBase(), EnterBubbleTestCases, ImeBecomesVisibleAndBubbleIsShrunkTestCase { companion object : FlickerPropertyInitializer() { /** Loading Loading @@ -94,7 +96,7 @@ class EnterBubbleWithImeViaBubbleMenuTest(navBar: NavBar) : } @get:Rule override val setUpRule = ApplyPerParameterRule( val setUpRule = ApplyPerParameterRule( Utils.testSetupRule(navBar).around(recordTraceWithTransitionRule), params = arrayOf(navBar) ) Loading