Extract out rotationLayerAppearsAndVanishes assertions

Fixes problem with rotationLayerAppearsAndVanishes_shellTransit calling rotationLayerAppearsAndVanishes which included the assertion along with an Assume.assumeFalse(isShellTransitionsEnabled) which meant the test would never run

Test: atest FlickerTests:ChangeAppRotationTest
Change-Id: Icf637f09a062e5f56cab4b5b28fbba7208b0fea4
This commit is contained in:
Pablo Gamito
2022-02-16 16:58:15 +01:00
parent 9e9c069e2d
commit eb773ab87a
2 changed files with 18 additions and 6 deletions

View File

@@ -112,10 +112,7 @@ class ChangeAppRotationTest(
* Checks that the [FlickerComponentName.ROTATION] layer appears during the transition,
* doesn't flicker, and disappears before the transition is complete
*/
@Presubmit
@Test
fun rotationLayerAppearsAndVanishes() {
Assume.assumeFalse(isShellTransitionsEnabled)
fun rotationLayerAppearsAndVanishesAssertion() {
testSpec.assertLayers {
this.isVisible(testApp.component)
.then()
@@ -126,11 +123,26 @@ class ChangeAppRotationTest(
}
}
/**
* Checks that the [FlickerComponentName.ROTATION] layer appears during the transition,
* doesn't flicker, and disappears before the transition is complete
*/
@Presubmit
@Test
fun rotationLayerAppearsAndVanishes() {
Assume.assumeFalse(isShellTransitionsEnabled)
rotationLayerAppearsAndVanishesAssertion()
}
/**
* Checks that the [FlickerComponentName.ROTATION] layer appears during the transition,
* doesn't flicker, and disappears before the transition is complete
*/
@FlakyTest(bugId = 218484127)
@Test
fun rotationLayerAppearsAndVanishes_shellTransit() {
Assume.assumeTrue(isShellTransitionsEnabled)
rotationLayerAppearsAndVanishes()
rotationLayerAppearsAndVanishesAssertion()
}
/**

View File

@@ -153,4 +153,4 @@ abstract class RotationTransition(protected val testSpec: FlickerTestParameter)
}
}
}
}
}