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

Commit c40b0313 authored by Nataniel Borges's avatar Nataniel Borges
Browse files

11/ Support splash screen and app visibility changes occurring in any order

Bug: 231110659
Test: atest FlickerTests
Change-Id: Ie163a70fa203f57e5154608b390861c45c55ec0d
parent e72586fa
Loading
Loading
Loading
Loading
+17 −5
Original line number Diff line number Diff line
@@ -228,11 +228,23 @@ abstract class OpenAppTransition(protected val testSpec: FlickerTestParameter) {
        testSpec.assertWm {
            this.isAppWindowNotOnTop(testApp.component)
                    .then()
                    .isAppWindowOnTop(FlickerComponentName.SNAPSHOT, isOptional = true)
                    .then()
                    .isAppWindowOnTop(FlickerComponentName.SPLASH_SCREEN, isOptional = true)
                    .then()
                    .isAppWindowOnTop(testApp.component)
                    .isAppWindowOnTop(
                        testApp.component
                            .or(FlickerComponentName.SNAPSHOT)
                            .or(FlickerComponentName.SPLASH_SCREEN)
                    )
        }
    }

    /**
     * Checks that [testApp] window is not on top at the start of the transition, and then becomes
     * the top visible window until the end of the transition.
     */
    @Presubmit
    @Test
    open fun appWindowIsTopWindowAtEnd() {
        testSpec.assertWmEnd {
            this.isAppWindowOnTop(testApp.component)
        }
    }
}