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
This commit is contained in:
Pablo Gamito
2022-07-21 09:59:46 +00:00
parent f8e898e26c
commit eade4f170f
6 changed files with 21 additions and 0 deletions

View File

@@ -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() { }

View File

@@ -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() { }

View File

@@ -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() { }

View File

@@ -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() { }

View File

@@ -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() { }

View File

@@ -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() { }