From 06a2cedebf5d6c714462222c49245ce4d9781396 Mon Sep 17 00:00:00 2001 From: Nataniel Borges Date: Thu, 28 Jul 2022 17:02:11 +0000 Subject: [PATCH] Fix navbar layer visibility check on tablet Fixes: 240570448 Test: atest FlickerTests Change-Id: Iada7f2267c4c3c29db9d1362252175cf22d76829 --- .../launch/OpenAppNonResizeableTest.kt | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) 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 1ad5426e19bc6..f88d846e34cef 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 @@ -72,6 +72,7 @@ open class OpenAppNonResizeableTest(testSpec: FlickerTestParameter) : @FlakyTest(bugId = 227083463) @Test fun navBarLayerVisibilityChanges() { + Assume.assumeFalse(testSpec.isTablet) testSpec.assertLayers { this.isInvisible(ComponentMatcher.NAV_BAR) .then() @@ -134,27 +135,32 @@ 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() { } + 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() { } + 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() { } + 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() { } + 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() { } + override fun statusBarWindowIsAlwaysVisible() { + } /** * Checks the position of the [ComponentMatcher.STATUS_BAR] at the end of the @@ -170,6 +176,7 @@ open class OpenAppNonResizeableTest(testSpec: FlickerTestParameter) : @Postsubmit @Test fun navBarLayerIsVisibleAtEnd() { + Assume.assumeFalse(testSpec.isTablet) testSpec.assertLayersEnd { this.isVisible(ComponentMatcher.NAV_BAR) } @@ -179,7 +186,7 @@ open class OpenAppNonResizeableTest(testSpec: FlickerTestParameter) : @FlakyTest @Test override fun visibleLayersShownMoreThanOneConsecutiveEntry() = - super.visibleLayersShownMoreThanOneConsecutiveEntry() + super.visibleLayersShownMoreThanOneConsecutiveEntry() /** {@inheritDoc} */ @Presubmit @@ -205,7 +212,7 @@ open class OpenAppNonResizeableTest(testSpec: FlickerTestParameter) : @FlakyTest(bugId = 218470989) @Test override fun visibleWindowsShownMoreThanOneConsecutiveEntry() = - super.visibleWindowsShownMoreThanOneConsecutiveEntry() + super.visibleWindowsShownMoreThanOneConsecutiveEntry() @FlakyTest(bugId = 227143265) @Test @@ -223,12 +230,12 @@ open class OpenAppNonResizeableTest(testSpec: FlickerTestParameter) : @JvmStatic fun getParams(): Collection { return FlickerTestParameterFactory.getInstance() - .getConfigNonRotationTests( - repetitions = 3, - supportedNavigationModes = - listOf(WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL_OVERLAY), - supportedRotations = listOf(Surface.ROTATION_0) - ) + .getConfigNonRotationTests( + repetitions = 3, + supportedNavigationModes = + listOf(WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL_OVERLAY), + supportedRotations = listOf(Surface.ROTATION_0) + ) } } }