Merge changes from topic "empty-region-check-fix" into main

* changes:
  Empty region should cover at most any provided region
  Mark test as Flaky
  Disable flaky test
This commit is contained in:
Pablo Gamito
2023-07-31 10:45:47 +00:00
committed by Android (Google) Code Review
3 changed files with 21 additions and 1 deletions

View File

@@ -16,9 +16,13 @@
package com.android.wm.shell.flicker.splitscreen
import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import android.tools.common.NavBar
import android.tools.common.flicker.subject.layers.LayersTraceSubject
import android.tools.common.flicker.subject.region.RegionSubject
import android.tools.common.traces.component.ComponentNameMatcher.Companion.WALLPAPER_BBQ_WRAPPER
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.LegacyFlickerTest
@@ -56,6 +60,21 @@ class UnlockKeyguardToSplitScreen(override val flicker: LegacyFlickerTest) :
thisTransition(this)
}
@Test
@FlakyTest(bugId = 293578017)
override fun visibleLayersShownMoreThanOneConsecutiveEntry() =
super.visibleLayersShownMoreThanOneConsecutiveEntry()
// TODO(b/293578017) remove once that bug is resolve
@Test
@Presubmit
fun visibleLayersShownMoreThanOneConsecutiveEntry_withoutWallpaper() =
flicker.assertLayers { this.visibleLayersShownMoreThanOneConsecutiveEntry(
LayersTraceSubject.VISIBLE_FOR_MORE_THAN_ONE_ENTRY_IGNORE_LAYERS + listOf(
WALLPAPER_BBQ_WRAPPER
)
) }
@Test
fun splitScreenDividerIsVisibleAtEnd() {
flicker.assertLayersEnd { this.isVisible(SPLIT_SCREEN_DIVIDER_COMPONENT) }

View File

@@ -265,6 +265,7 @@ fun LayerTraceEntrySubject.splitAppLayerBoundsSnapToDivider(
val dividerRegion =
layer(SPLIT_SCREEN_DIVIDER_COMPONENT)?.visibleRegion?.region
?: error("$SPLIT_SCREEN_DIVIDER_COMPONENT component not found")
visibleRegion(component).isNotEmpty()
visibleRegion(component)
.coversAtMost(
if (displayBounds.width > displayBounds.height) {

View File

@@ -93,7 +93,7 @@ open class OpenAppFromLockscreenViaIntentTest(flicker: LegacyFlickerTest) :
* Checks that the [ComponentNameMatcher.NAV_BAR] starts the transition invisible, then becomes
* visible during the unlocking animation and remains visible at the end of the transition
*/
@Presubmit
@FlakyTest(bugId = 293581770)
@Test
fun navBarWindowsVisibilityChanges() {
Assume.assumeFalse(flicker.scenario.isTablet)