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

Commit 786e62ef authored by Nataniel Borges's avatar Nataniel Borges
Browse files

Enable passing shell transition tests

- App close: with home / with back
- Launch app: cold / warm / from overview
- Bubbles: expand / launch / dismiss

Bug: 214452854
Bug: 213852103
Bug: 219690120
Bug: 217777115
Bug: 205288792
Fixes: 219693385
Fixes: 219688533
Fixes: 218604389
Test: atest FlickerTests:com.android.server.wm.flicker.close
Change-Id: Ib9b290baac911d42fdc8ac87755fd8df98fdb272
parent acf4d5a8
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -28,9 +28,6 @@ import com.android.server.wm.flicker.FlickerParametersRunnerFactory
import com.android.server.wm.flicker.FlickerTestParameter
import com.android.server.wm.flicker.annotation.Group4
import com.android.server.wm.flicker.dsl.FlickerBuilder
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
import org.junit.Assume
import org.junit.Before
import org.junit.runner.RunWith
import org.junit.Test
import org.junit.runners.Parameterized
@@ -52,11 +49,6 @@ open class DismissBubbleScreen(testSpec: FlickerTestParameter) : BaseBubbleScree
    private val wm = context.getSystemService(Context.WINDOW_SERVICE) as WindowManager
    private val displaySize = DisplayMetrics()

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

    override val transition: FlickerBuilder.() -> Unit
        get() = buildTransition {
            setup {
+0 −44
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 androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice

import com.android.server.wm.flicker.FlickerParametersRunnerFactory
import com.android.server.wm.flicker.FlickerTestParameter
import com.android.server.wm.flicker.annotation.Group4
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
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)
@Group4
@FlakyTest(bugId = 217777115)
class DismissBubbleScreenShellTransit(
    testSpec: FlickerTestParameter
) : DismissBubbleScreen(testSpec) {
    @Before
    override fun before() {
        Assume.assumeTrue(isShellTransitionsEnabled)
    }
}
+0 −8
Original line number Diff line number Diff line
@@ -24,9 +24,6 @@ import com.android.server.wm.flicker.FlickerParametersRunnerFactory
import com.android.server.wm.flicker.FlickerTestParameter
import com.android.server.wm.flicker.annotation.Group4
import com.android.server.wm.flicker.dsl.FlickerBuilder
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
import org.junit.Assume
import org.junit.Before
import org.junit.runner.RunWith
import org.junit.Test
import org.junit.runners.Parameterized
@@ -47,11 +44,6 @@ import org.junit.runners.Parameterized
@Group4
open class ExpandBubbleScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(testSpec) {

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

    override val transition: FlickerBuilder.() -> Unit
        get() = buildTransition {
            setup {
+0 −42
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 androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
import com.android.server.wm.flicker.FlickerTestParameter
import com.android.server.wm.flicker.annotation.Group4
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
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)
@Group4
@FlakyTest(bugId = 217777115)
class ExpandBubbleScreenShellTransit(
    testSpec: FlickerTestParameter
) : ExpandBubbleScreen(testSpec) {
    @Before
    override fun before() {
        Assume.assumeTrue(isShellTransitionsEnabled)
    }
}
 No newline at end of file
+0 −19
Original line number Diff line number Diff line
@@ -17,15 +17,11 @@
package com.android.wm.shell.flicker.bubble

import android.platform.test.annotations.Presubmit
import androidx.test.filters.FlakyTest
import android.platform.test.annotations.RequiresDevice
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
import com.android.server.wm.flicker.FlickerTestParameter
import com.android.server.wm.flicker.annotation.Group4
import com.android.server.wm.flicker.dsl.FlickerBuilder
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
import org.junit.Assume
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
@@ -45,11 +41,6 @@ import org.junit.runners.Parameterized
@Group4
open class LaunchBubbleScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(testSpec) {

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

    override val transition: FlickerBuilder.() -> Unit
        get() = buildTransition {
            transitions {
@@ -61,16 +52,6 @@ open class LaunchBubbleScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen
    @Presubmit
    @Test
    open fun testAppIsAlwaysVisible() {
        Assume.assumeFalse(isShellTransitionsEnabled)
        testSpec.assertLayers {
            this.isVisible(testApp.component)
        }
    }

    @FlakyTest(bugId = 218642026)
    @Test
    open fun testAppIsAlwaysVisible_ShellTransit() {
        Assume.assumeTrue(isShellTransitionsEnabled)
        testSpec.assertLayers {
            this.isVisible(testApp.component)
        }
Loading