From 7ed2186799f3868d6c64bf3c97176473e5ea716f Mon Sep 17 00:00:00 2001 From: Nataniel Borges Date: Thu, 22 Jun 2023 13:01:35 +0000 Subject: [PATCH] Split flaky app close assertion until the bug is fixed. Don't downgrade assertion to avoid losing coverage Test: atest FlickerTestsAppClose Bug: 288369951 Change-Id: I80df9fb5c6ec6995675dcb245dd7e53e49504b8b --- .../wm/flicker/close/CloseAppTransition.kt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/close/CloseAppTransition.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/close/CloseAppTransition.kt index 9be9cb77979a6..8737edb445f1d 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/close/CloseAppTransition.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/close/CloseAppTransition.kt @@ -16,7 +16,10 @@ package com.android.server.wm.flicker.close +import android.platform.test.annotations.FlakyTest import android.platform.test.annotations.Presubmit +import android.tools.common.flicker.subject.layers.LayersTraceSubject.Companion.VISIBLE_FOR_MORE_THAN_ONE_ENTRY_IGNORE_LAYERS +import android.tools.common.traces.component.ComponentNameMatcher import android.tools.common.traces.component.ComponentNameMatcher.Companion.LAUNCHER import android.tools.device.apphelpers.StandardAppHelper import android.tools.device.flicker.legacy.FlickerBuilder @@ -71,4 +74,21 @@ abstract class CloseAppTransition(flicker: LegacyFlickerTest) : BaseTest(flicker ignoreEntriesWithRotationLayer = flicker.scenario.isLandscapeOrSeascapeAtStart ) } + + /** {@inheritDoc} */ + @Presubmit + @Test + override fun visibleLayersShownMoreThanOneConsecutiveEntry() { + flicker.assertLayers { + this.visibleLayersShownMoreThanOneConsecutiveEntry( + VISIBLE_FOR_MORE_THAN_ONE_ENTRY_IGNORE_LAYERS + listOf(ComponentNameMatcher.NAV_BAR) + ) + } + } + + @FlakyTest(bugId = 288369951) + @Test + fun visibleLayersShownMoreThanOneConsecutiveEntryWithNavBar() { + flicker.assertLayers { this.visibleLayersShownMoreThanOneConsecutiveEntry() } + } }