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

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

Remove legacy tests

Shell transitions has landed and it's the only system we run in master

Bug: 217777115
Bug: 197726610
Bug: 246284124
Bug: 240918620
Fixes: 273944864
Test: atest FlickerTests WMShellFlickerTests
Change-Id: I89755ca76b9fb11a079755213f7f9e60749b79ab
parent dc0dfc10
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -17,8 +17,8 @@
package com.android.wm.shell.flicker.bubble

import android.os.SystemClock
import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Presubmit
import android.tools.device.flicker.isShellTransitionsEnabled
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.FlickerTest
@@ -26,8 +26,6 @@ import androidx.test.filters.RequiresDevice
import androidx.test.uiautomator.By
import androidx.test.uiautomator.UiObject2
import androidx.test.uiautomator.Until
import org.junit.Assume
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
@@ -45,13 +43,8 @@ import org.junit.runners.Parameterized
@RequiresDevice
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FlakyTest(bugId = 217777115)
open class ChangeActiveActivityFromBubbleTest(flicker: FlickerTest) : BaseBubbleScreen(flicker) {

    @Before
    open fun before() {
        Assume.assumeFalse(isShellTransitionsEnabled)
    }

    /** {@inheritDoc} */
    override val transition: FlickerBuilder.() -> Unit
        get() = buildTransition {
+0 −39
Original line number Diff line number Diff line
/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.wm.shell.flicker.bubble

import android.platform.test.annotations.FlakyTest
import android.tools.device.flicker.isShellTransitionsEnabled
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerTest
import androidx.test.filters.RequiresDevice
import org.junit.Assume
import org.junit.Before
import org.junit.runner.RunWith
import org.junit.runners.Parameterized

@RequiresDevice
@RunWith(Parameterized::class)
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FlakyTest(bugId = 217777115)
class ChangeActiveActivityFromBubbleTestShellTransit(flicker: FlickerTest) :
    ChangeActiveActivityFromBubbleTest(flicker) {
    @Before
    override fun before() {
        Assume.assumeTrue(isShellTransitionsEnabled)
    }
}
+10 −19
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
import android.tools.common.Rotation
import android.tools.common.datatypes.component.ComponentNameMatcher.Companion.LAUNCHER
import android.tools.device.flicker.isShellTransitionsEnabled
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.FlickerTest
import android.tools.device.flicker.legacy.FlickerTestFactory
@@ -43,7 +42,6 @@ abstract class ClosePipTransition(flicker: FlickerTest) : PipTransition(flicker)
    @Presubmit
    @Test
    open fun pipWindowBecomesInvisible() {
        if (isShellTransitionsEnabled) {
        // When Shell transition is enabled, we change the windowing mode at start, but
        // update the visibility after the transition is finished, so we can't check isNotPinned
        // and isAppWindowInvisible in the same assertion block.
@@ -55,13 +53,6 @@ abstract class ClosePipTransition(flicker: FlickerTest) : PipTransition(flicker)
                .invoke("!hasPipWindow") { it.isNotPinned(pipApp).isAppWindowNotOnTop(pipApp) }
        }
        flicker.assertWmEnd { isAppWindowInvisible(pipApp) }
        } else {
            flicker.assertWm {
                this.invoke("hasPipWindow") { it.isPinned(pipApp).isAppWindowVisible(pipApp) }
                    .then()
                    .invoke("!hasPipWindow") { it.isNotPinned(pipApp).isAppWindowInvisible(pipApp) }
            }
        }
    }

    /**
+0 −20
Original line number Diff line number Diff line
@@ -16,16 +16,11 @@

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

import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Presubmit
import android.tools.device.flicker.isShellTransitionsEnabled
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.FlickerTest
import androidx.test.filters.RequiresDevice
import org.junit.Assume
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.junit.runners.Parameterized
@@ -73,19 +68,4 @@ open class ExitPipToAppViaExpandButtonTest(flicker: FlickerTest) : ExitPipToAppT
                wmHelper.StateSyncBuilder().withWindowSurfaceDisappeared(testApp).waitForAndVerify()
            }
        }

    /** {@inheritDoc} */
    @FlakyTest(bugId = 197726610)
    @Test
    override fun pipLayerExpands() {
        Assume.assumeFalse(isShellTransitionsEnabled)
        super.pipLayerExpands()
    }

    @Presubmit
    @Test
    fun pipLayerExpands_ShellTransit() {
        Assume.assumeTrue(isShellTransitionsEnabled)
        super.pipLayerExpands()
    }
}
+0 −38
Original line number Diff line number Diff line
@@ -16,16 +16,11 @@

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

import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Presubmit
import android.tools.device.flicker.isShellTransitionsEnabled
import android.tools.device.flicker.junit.FlickerParametersRunnerFactory
import android.tools.device.flicker.legacy.FlickerBuilder
import android.tools.device.flicker.legacy.FlickerTest
import androidx.test.filters.RequiresDevice
import org.junit.Assume
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.junit.runners.Parameterized
@@ -72,37 +67,4 @@ open class ExitPipToAppViaIntentTest(flicker: FlickerTest) : ExitPipToAppTransit
                wmHelper.StateSyncBuilder().withWindowSurfaceDisappeared(testApp).waitForAndVerify()
            }
        }

    /** {@inheritDoc} */
    @Presubmit @Test override fun entireScreenCovered() = super.entireScreenCovered()

    /** {@inheritDoc} */
    @Presubmit
    @Test
    override fun statusBarLayerPositionAtStartAndEnd() {
        Assume.assumeFalse(isShellTransitionsEnabled)
        super.statusBarLayerPositionAtStartAndEnd()
    }

    @Presubmit
    @Test
    fun statusBarLayerRotatesScales_ShellTransit() {
        Assume.assumeTrue(isShellTransitionsEnabled)
        super.statusBarLayerPositionAtStartAndEnd()
    }

    /** {@inheritDoc} */
    @FlakyTest(bugId = 197726610)
    @Test
    override fun pipLayerExpands() {
        Assume.assumeFalse(isShellTransitionsEnabled)
        super.pipLayerExpands()
    }

    @Presubmit
    @Test
    fun pipLayerExpands_ShellTransit() {
        Assume.assumeTrue(isShellTransitionsEnabled)
        super.pipLayerExpands()
    }
}
Loading