From eade4f170fb830632e05394d60cb84cf875c2a16 Mon Sep 17 00:00:00 2001 From: Pablo Gamito Date: Thu, 21 Jul 2022 09:59:46 +0000 Subject: [PATCH] Add Test annotation to overridden @Ignored methods Because of JUnit's reflection based model if the overridden method does not have an @Test method then it does not consider any of it's annotation since that overridden method is not considered a test but still runs because the parent is annotated with @Test so when it's called, the overridden method does get called and runs but is not ignored Test: atest FlickerLibTest Change-Id: Iecd2ad71f4590260856e2667bdf3a9979af2d3ce --- .../server/wm/flicker/ime/OpenImeWindowToOverViewTest.kt | 4 ++++ .../wm/flicker/launch/OpenAppFromLockNotificationCold.kt | 2 ++ .../wm/flicker/launch/OpenAppFromLockNotificationWarm.kt | 2 ++ .../server/wm/flicker/launch/OpenAppFromLockTransition.kt | 5 +++++ .../server/wm/flicker/launch/OpenAppNonResizeableTest.kt | 5 +++++ .../server/wm/flicker/rotation/SeamlessAppRotationTest.kt | 3 +++ 6 files changed, 21 insertions(+) diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/OpenImeWindowToOverViewTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/OpenImeWindowToOverViewTest.kt index 0f809eef1dd4c..470fa58b0ff23 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/OpenImeWindowToOverViewTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/OpenImeWindowToOverViewTest.kt @@ -193,18 +193,22 @@ class OpenImeWindowToOverViewTest(testSpec: FlickerTestParameter) : BaseTest(tes } /** {@inheritDoc} */ + @Test @Ignore("Visibility changes depending on orientation and navigation mode") override fun navBarLayerIsVisibleAtStartAndEnd() { } /** {@inheritDoc} */ + @Test @Ignore("Visibility changes depending on orientation and navigation mode") override fun navBarLayerPositionAtStartAndEnd() { } /** {@inheritDoc} */ + @Test @Ignore("Visibility changes depending on orientation and navigation mode") override fun statusBarLayerPositionAtStartAndEnd() { } /** {@inheritDoc} */ + @Test @Ignore("Visibility changes depending on orientation and navigation mode") override fun statusBarLayerIsVisibleAtStartAndEnd() { } diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromLockNotificationCold.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromLockNotificationCold.kt index 242a884b2852c..220e4caf5faa5 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromLockNotificationCold.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromLockNotificationCold.kt @@ -91,6 +91,7 @@ open class OpenAppFromLockNotificationCold(testSpec: FlickerTestParameter) : override fun appWindowBecomesTopWindow() = super.appWindowBecomesTopWindow() /** {@inheritDoc} */ + @Test @Ignore("Display is off at the start") override fun navBarLayerPositionAtStartAndEnd() { } @@ -105,6 +106,7 @@ open class OpenAppFromLockNotificationCold(testSpec: FlickerTestParameter) : } /** {@inheritDoc} */ + @Test @Ignore("Display is off at the start") override fun statusBarLayerPositionAtStartAndEnd() { } diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromLockNotificationWarm.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromLockNotificationWarm.kt index 3619505145825..9ed1bde866471 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromLockNotificationWarm.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromLockNotificationWarm.kt @@ -117,6 +117,7 @@ open class OpenAppFromLockNotificationWarm(testSpec: FlickerTestParameter) : super.visibleWindowsShownMoreThanOneConsecutiveEntry() /** {@inheritDoc} */ + @Test @Ignore("Not applicable to this CUJ. Display starts off and app is full screen at the end") override fun navBarLayerPositionAtStartAndEnd() { } @@ -131,6 +132,7 @@ open class OpenAppFromLockNotificationWarm(testSpec: FlickerTestParameter) : } /** {@inheritDoc} */ + @Test @Ignore("Not applicable to this CUJ. Display starts off and app is full screen at the end") override fun statusBarLayerPositionAtStartAndEnd() { } diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromLockTransition.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromLockTransition.kt index 5a4b3693f665d..1d8b0a64c70f4 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromLockTransition.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromLockTransition.kt @@ -102,18 +102,22 @@ abstract class OpenAppFromLockTransition(testSpec: FlickerTestParameter) : override fun appWindowBecomesVisible() = super.appWindowBecomesVisible() /** {@inheritDoc} */ + @Test @Ignore("Not applicable to this CUJ. Display starts off and app is full screen at the end") override fun navBarLayerPositionAtStartAndEnd() { } /** {@inheritDoc} */ + @Test @Ignore("Not applicable to this CUJ. Display starts off and app is full screen at the end") override fun statusBarLayerPositionAtStartAndEnd() { } /** {@inheritDoc} */ + @Test @Ignore("Not applicable to this CUJ. Display starts off and app is full screen at the end") override fun taskBarLayerIsVisibleAtStartAndEnd() { } /** {@inheritDoc} */ + @Test @Ignore("Not applicable to this CUJ. Display starts off and app is full screen at the end") override fun taskBarWindowIsAlwaysVisible() { } @@ -135,6 +139,7 @@ abstract class OpenAppFromLockTransition(testSpec: FlickerTestParameter) : fun statusBarLayerPositionAtEnd() = testSpec.statusBarLayerPositionAtEnd() /** {@inheritDoc} */ + @Test @Ignore("Not applicable to this CUJ. Display starts off and app is full screen at the end") override fun statusBarLayerIsVisibleAtStartAndEnd() { } diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppNonResizeableTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppNonResizeableTest.kt index c03cb56d80d34..1ad5426e19bc6 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppNonResizeableTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppNonResizeableTest.kt @@ -132,22 +132,27 @@ open class OpenAppNonResizeableTest(testSpec: FlickerTestParameter) : } /** {@inheritDoc} */ + @Test @Ignore("Not applicable to this CUJ. Display starts off and app is full screen at the end") override fun taskBarLayerIsVisibleAtStartAndEnd() { } /** {@inheritDoc} */ + @Test @Ignore("Not applicable to this CUJ. Display starts off and app is full screen at the end") override fun navBarLayerIsVisibleAtStartAndEnd() { } /** {@inheritDoc} */ + @Test @Ignore("Not applicable to this CUJ. Display starts off and app is full screen at the end") override fun taskBarWindowIsAlwaysVisible() { } /** {@inheritDoc} */ + @Test @Ignore("Not applicable to this CUJ. Display starts off and app is full screen at the end") override fun navBarWindowIsAlwaysVisible() { } /** {@inheritDoc} */ + @Test @Ignore("Not applicable to this CUJ. Display starts off and app is full screen at the end") override fun statusBarWindowIsAlwaysVisible() { } diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/SeamlessAppRotationTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/SeamlessAppRotationTest.kt index b2a2381c55789..1e3caa43a07c1 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/SeamlessAppRotationTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/SeamlessAppRotationTest.kt @@ -164,14 +164,17 @@ open class SeamlessAppRotationTest( } /** {@inheritDoc} */ + @Test @Ignore("Not applicable to this CUJ. App is full screen") override fun statusBarLayerPositionAtStartAndEnd() { } /** {@inheritDoc} */ + @Test @Ignore("Not applicable to this CUJ. App is full screen") override fun statusBarLayerIsVisibleAtStartAndEnd() { } /** {@inheritDoc} */ + @Test @Ignore("Not applicable to this CUJ. App is full screen") override fun statusBarWindowIsAlwaysVisible() { }