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

Commit 3960bf65 authored by Ioana Moraru's avatar Ioana Moraru
Browse files

Enable FASS assertions for IME Appear

Add a new test rule to OpenImeWindowTest 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: I018c657f12cfbf2377b4353c13981f2c000f6ccf
parent 9baea5ec
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.server.wm.flicker.ime

import android.app.Instrumentation
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import android.view.Surface
import android.view.WindowManagerPolicyConstants
@@ -34,10 +35,12 @@ import com.android.server.wm.flicker.navBarLayerRotatesAndScales
import com.android.server.wm.flicker.navBarWindowIsVisible
import com.android.server.wm.flicker.entireScreenCovered
import com.android.server.wm.flicker.dsl.FlickerBuilder
import com.android.server.wm.flicker.rules.WMFlickerServiceRuleForTestSpec
import com.android.server.wm.flicker.statusBarLayerIsVisible
import com.android.server.wm.flicker.statusBarLayerRotatesScales
import com.android.server.wm.flicker.statusBarWindowIsVisible
import org.junit.FixMethodOrder
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@@ -53,6 +56,9 @@ import org.junit.runners.Parameterized
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@Group2
class OpenImeWindowTest(private val testSpec: FlickerTestParameter) {
    @get:Rule
    val flickerRule = WMFlickerServiceRuleForTestSpec(testSpec)

    private val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation()
    private val testApp = ImeAppHelper(instrumentation)

@@ -146,6 +152,24 @@ class OpenImeWindowTest(private val testSpec: FlickerTestParameter) {
        }
    }

    @Postsubmit
    @Test
    fun runPresubmitAssertion() {
        flickerRule.checkPresubmitAssertions()
    }

    @Postsubmit
    @Test
    fun runPostsubmitAssertion() {
        flickerRule.checkPostsubmitAssertions()
    }

    @FlakyTest
    @Test
    fun runFlakyAssertion() {
        flickerRule.checkFlakyAssertions()
    }

    companion object {
        @Parameterized.Parameters(name = "{0}")
        @JvmStatic