From 699f3f7fea646f71085e7fa7b82a1e29a6e18539 Mon Sep 17 00:00:00 2001 From: Ioana Moraru Date: Mon, 18 Oct 2021 21:32:40 +0000 Subject: [PATCH] Enable FASS assertions for Pip Enter Add a new test rule to EnterPipTest 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: I884437876f5bef6a58b4f7bacfbad0fa435e0256 --- .../wm/shell/flicker/pip/EnterPipTest.kt | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipTest.kt index c439922063ac2..c7064287218db 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipTest.kt @@ -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 @@ -27,8 +28,10 @@ import com.android.server.wm.flicker.LAUNCHER_COMPONENT 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 @@ -57,6 +60,9 @@ import org.junit.runners.Parameterized @FixMethodOrder(MethodSorters.NAME_ASCENDING) @Group3 class EnterPipTest(testSpec: FlickerTestParameter) : PipTransition(testSpec) { + @get:Rule + val flickerRule = WMFlickerServiceRuleForTestSpec(testSpec) + /** * Defines the transition used to run the test */ @@ -67,6 +73,24 @@ class EnterPipTest(testSpec: FlickerTestParameter) : PipTransition(testSpec) { } } + @Postsubmit + @Test + fun runPresubmitAssertion() { + flickerRule.checkPresubmitAssertions() + } + + @Postsubmit + @Test + fun runPostsubmitAssertion() { + flickerRule.checkPostsubmitAssertions() + } + + @FlakyTest + @Test + fun runFlakyAssertion() { + flickerRule.checkFlakyAssertions() + } + /** {@inheritDoc} */ @Presubmit @Test