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

Commit 5a49e800 authored by Nataniel Borges's avatar Nataniel Borges
Browse files

Update flaky flicker TaskTransitionTest tests

Fixes: 291176347
Bug: 285980483
Test: atest FlickerTestsAppLaunch
Change-Id: Iea959ffc748bc743272e238f57d2d51a38c273bd
parent 17b87e66
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.app.WallpaperManager
import android.content.res.Resources
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.SPLASH_SCREEN
import android.tools.common.traces.component.ComponentNameMatcher.Companion.WALLPAPER_BBQ_WRAPPER
@@ -190,6 +191,16 @@ class TaskTransitionTest(flicker: LegacyFlickerTest) : BaseTest(flicker) {
        }
    }

    @Presubmit
    @Test
    override fun visibleLayersShownMoreThanOneConsecutiveEntry() {
        flicker.assertLayers {
            this.visibleLayersShownMoreThanOneConsecutiveEntry(
                VISIBLE_FOR_MORE_THAN_ONE_ENTRY_IGNORE_LAYERS + listOf(launchNewTaskApp)
            )
        }
    }

    companion object {
        private fun getWallpaperPackage(instrumentation: Instrumentation): IComponentMatcher {
            val wallpaperManager = WallpaperManager.getInstance(instrumentation.targetContext)