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

Commit c0da8c3f authored by Nataniel Borges's avatar Nataniel Borges
Browse files

New enter pip assertion

Rename previous assertion to "pip app always visible" and create a new one asserting that pip window becomes visible

Test: atest FlickerTests:com.android.wm.shell.flicker.pip
Bug: 167521701
Change-Id: I237c8369b58a766b60f4eb96b7dc465e86f96679
parent 41b7c172
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.wm.shell.flicker.pip

import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import android.view.Surface
import androidx.test.filters.FlakyTest
@@ -49,7 +50,7 @@ class EnterPipTest(testSpec: FlickerTestParameter) : PipTransition(testSpec) {

    @Presubmit
    @Test
    fun pipWindowBecomesVisible() {
    fun pipAppWindowAlwaysVisible() {
        testSpec.assertWm {
            this.showsAppWindow(pipApp.defaultWindowName)
        }
@@ -63,6 +64,16 @@ class EnterPipTest(testSpec: FlickerTestParameter) : PipTransition(testSpec) {
        }
    }

    @Postsubmit
    @Test
    fun pipWindowBecomesVisible() {
        testSpec.assertWm {
            invoke("pipWindowIsNotVisible") { !it.wmState.hasPipWindow() }
                .then()
                .invoke("pipWindowIsVisible") { it.wmState.hasPipWindow() }
        }
    }

    @FlakyTest(bugId = 140855415)
    @Test
    override fun navBarLayerIsAlwaysVisible() = super.navBarLayerIsAlwaysVisible()