Merge "Stabilize bubble tests" into udc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
8d7ade8599
@@ -72,6 +72,10 @@ abstract class BaseBubbleScreen(flicker: LegacyFlickerTest) : BaseTest(flicker)
|
||||
uid,
|
||||
NotificationManager.BUBBLE_PREFERENCE_NONE
|
||||
)
|
||||
device.wait(
|
||||
Until.gone(By.res(SYSTEM_UI_PACKAGE, BUBBLE_RES_NAME)),
|
||||
FIND_OBJECT_TIMEOUT
|
||||
)
|
||||
testApp.exit(wmHelper)
|
||||
}
|
||||
|
||||
@@ -92,7 +96,7 @@ abstract class BaseBubbleScreen(flicker: LegacyFlickerTest) : BaseTest(flicker)
|
||||
supportedRotations = listOf(Rotation.ROTATION_0)
|
||||
)
|
||||
|
||||
const val FIND_OBJECT_TIMEOUT = 2000L
|
||||
const val FIND_OBJECT_TIMEOUT = 4000L
|
||||
const val SYSTEM_UI_PACKAGE = SYSTEMUI_PACKAGE
|
||||
const val BUBBLE_RES_NAME = "bubble_view"
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ package com.android.wm.shell.flicker.bubble
|
||||
import android.content.Context
|
||||
import android.graphics.Point
|
||||
import android.platform.test.annotations.Presubmit
|
||||
import android.tools.common.flicker.subject.layers.LayersTraceSubject
|
||||
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
|
||||
import android.tools.device.flicker.legacy.FlickerBuilder
|
||||
import android.tools.device.flicker.legacy.LegacyFlickerTest
|
||||
@@ -73,4 +74,14 @@ open class DragToDismissBubbleScreenTest(flicker: LegacyFlickerTest) : BaseBubbl
|
||||
open fun testAppIsAlwaysVisible() {
|
||||
flicker.assertLayers { this.isVisible(testApp) }
|
||||
}
|
||||
|
||||
@Presubmit
|
||||
@Test
|
||||
override fun visibleLayersShownMoreThanOneConsecutiveEntry() {
|
||||
flicker.assertLayers {
|
||||
this.visibleLayersShownMoreThanOneConsecutiveEntry(
|
||||
LayersTraceSubject.VISIBLE_FOR_MORE_THAN_ONE_ENTRY_IGNORE_LAYERS + listOf(testApp)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ class OpenActivityFromBubbleOnLocksreenTest(flicker: LegacyFlickerTest) :
|
||||
instrumentation.uiAutomation.syncInputTransactions()
|
||||
val showBubble =
|
||||
device.wait(
|
||||
Until.findObject(By.res("com.android.systemui", "bubble_view")),
|
||||
Until.findObject(By.res(SYSTEM_UI_PACKAGE, BUBBLE_RES_NAME)),
|
||||
FIND_OBJECT_TIMEOUT
|
||||
)
|
||||
showBubble?.click() ?: error("Bubble notify not found")
|
||||
|
||||
@@ -55,6 +55,7 @@ open class SendBubbleNotificationTest(flicker: LegacyFlickerTest) : BaseBubbleSc
|
||||
FIND_OBJECT_TIMEOUT
|
||||
)
|
||||
?: error("No bubbles found")
|
||||
device.waitForIdle()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user