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

Commit 5f6e63d6 authored by Pablo Gamito's avatar Pablo Gamito
Browse files

Make sure we wait for Bubbles to show

Bug: 248037249

Test: atest com.android.wm.shell.flicker.bubble.LaunchBubbleScreen
Change-Id: I0ec16e5dc92a237f5d858cab9685b1cfb53f94af
parent 51847be2
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -16,8 +16,9 @@

package com.android.wm.shell.flicker.bubble

import android.platform.test.annotations.Presubmit
import android.platform.test.annotations.RequiresDevice
import androidx.test.uiautomator.By
import androidx.test.uiautomator.Until
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
import com.android.server.wm.flicker.FlickerTestParameter
import com.android.server.wm.flicker.annotation.Group4
@@ -47,10 +48,15 @@ open class LaunchBubbleScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen
            transitions {
                val addBubbleBtn = waitAndGetAddBubbleBtn()
                addBubbleBtn?.click() ?: error("Bubble widget not found")

                device.wait(
                    Until.findObjects(
                        By.res(SYSTEM_UI_PACKAGE, BUBBLE_RES_NAME)
                    ), FIND_OBJECT_TIMEOUT
                ) ?: error("No bubbles found")
            }
        }

    @Presubmit
    @Test
    open fun testAppIsAlwaysVisible() {
        testSpec.assertLayers {