Enable FASS assertions for Pip Exit
Add a new test rule to ExitPipTest for comparing the new FASS assertions with the old flicker testing. If the flicker tests from one category (presubmit/postsumbit/flaky) are passing or failing, the corresponding FASS test should have the same behaviour. Bug: 201523242 Test: see the results in the dashboard go/wm-tests-flicker Change-Id: I606e57d8780c0d7cb6191890b052501b7974b034
This commit is contained in:
committed by
Nataniel Borges
parent
a299dd6cec
commit
b8f3f9d239
@@ -16,8 +16,10 @@
|
||||
|
||||
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
|
||||
import androidx.test.filters.RequiresDevice
|
||||
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
@@ -25,8 +27,10 @@ import com.android.server.wm.flicker.FlickerTestParameterFactory
|
||||
import com.android.server.wm.flicker.annotation.Group3
|
||||
import com.android.server.wm.flicker.dsl.FlickerBuilder
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import com.android.server.wm.flicker.rules.WMFlickerServiceRuleForTestSpec
|
||||
import org.junit.Assume.assumeFalse
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.MethodSorters
|
||||
@@ -56,6 +60,8 @@ import org.junit.runners.Parameterized
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
@Group3
|
||||
class ExitPipViaIntentTest(testSpec: FlickerTestParameter) : ExitPipToAppTransition(testSpec) {
|
||||
@get:Rule
|
||||
val flickerRule = WMFlickerServiceRuleForTestSpec(testSpec)
|
||||
|
||||
/**
|
||||
* Defines the transition used to run the test
|
||||
@@ -76,6 +82,24 @@ class ExitPipViaIntentTest(testSpec: FlickerTestParameter) : ExitPipToAppTransit
|
||||
}
|
||||
}
|
||||
|
||||
@Postsubmit
|
||||
@Test
|
||||
fun runPresubmitAssertion() {
|
||||
flickerRule.checkPresubmitAssertions()
|
||||
}
|
||||
|
||||
@Postsubmit
|
||||
@Test
|
||||
fun runPostsubmitAssertion() {
|
||||
flickerRule.checkPostsubmitAssertions()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
@Test
|
||||
fun runFlakyAssertion() {
|
||||
flickerRule.checkFlakyAssertions()
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Presubmit
|
||||
@Test
|
||||
|
||||
@@ -16,8 +16,10 @@
|
||||
|
||||
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
|
||||
import androidx.test.filters.RequiresDevice
|
||||
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
@@ -25,9 +27,11 @@ import com.android.server.wm.flicker.FlickerTestParameterFactory
|
||||
import com.android.server.wm.flicker.annotation.Group3
|
||||
import com.android.server.wm.flicker.dsl.FlickerBuilder
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import com.android.server.wm.flicker.rules.WMFlickerServiceRuleForTestSpec
|
||||
import org.junit.Assume.assumeFalse
|
||||
import org.junit.Before
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.MethodSorters
|
||||
@@ -57,6 +61,9 @@ import org.junit.runners.Parameterized
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
@Group3
|
||||
class ExitPipWithDismissButtonTest(testSpec: FlickerTestParameter) : ExitPipTransition(testSpec) {
|
||||
@get:Rule
|
||||
val flickerRule = WMFlickerServiceRuleForTestSpec(testSpec)
|
||||
|
||||
override val transition: FlickerBuilder.() -> Unit
|
||||
get() = {
|
||||
super.transition(this)
|
||||
@@ -65,6 +72,24 @@ class ExitPipWithDismissButtonTest(testSpec: FlickerTestParameter) : ExitPipTran
|
||||
}
|
||||
}
|
||||
|
||||
@Postsubmit
|
||||
@Test
|
||||
fun runPresubmitAssertion() {
|
||||
flickerRule.checkPresubmitAssertions()
|
||||
}
|
||||
|
||||
@Postsubmit
|
||||
@Test
|
||||
fun runPostsubmitAssertion() {
|
||||
flickerRule.checkPostsubmitAssertions()
|
||||
}
|
||||
|
||||
@FlakyTest
|
||||
@Test
|
||||
fun runFlakyAssertion() {
|
||||
flickerRule.checkFlakyAssertions()
|
||||
}
|
||||
|
||||
@Before
|
||||
fun onBefore() {
|
||||
// This CUJ don't work in shell transitions because of b/204570898 b/204562589
|
||||
|
||||
@@ -72,22 +72,6 @@ class ExitPipWithSwipeDownTest(testSpec: FlickerTestParameter) : ExitPipTransiti
|
||||
}
|
||||
}
|
||||
|
||||
@Presubmit
|
||||
@Test
|
||||
override fun navBarLayerIsVisible() = super.navBarLayerIsVisible()
|
||||
|
||||
@Presubmit
|
||||
@Test
|
||||
override fun statusBarLayerIsVisible() = super.statusBarLayerIsVisible()
|
||||
|
||||
@Presubmit
|
||||
@Test
|
||||
override fun navBarWindowIsVisible() = super.navBarWindowIsVisible()
|
||||
|
||||
@Presubmit
|
||||
@Test
|
||||
override fun statusBarWindowIsVisible() = super.statusBarWindowIsVisible()
|
||||
|
||||
@FlakyTest
|
||||
@Test
|
||||
override fun pipWindowBecomesInvisible() = super.pipWindowBecomesInvisible()
|
||||
@@ -104,14 +88,6 @@ class ExitPipWithSwipeDownTest(testSpec: FlickerTestParameter) : ExitPipTransiti
|
||||
testSpec.statusBarLayerRotatesScales()
|
||||
}
|
||||
|
||||
@Presubmit
|
||||
@Test
|
||||
override fun entireScreenCovered() = super.entireScreenCovered()
|
||||
|
||||
@Presubmit
|
||||
@Test
|
||||
override fun navBarLayerRotatesAndScales() = super.navBarLayerRotatesAndScales()
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Creates the test configurations.
|
||||
|
||||
Reference in New Issue
Block a user