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

Commit 9ba5e6a4 authored by Andreas Miko's avatar Andreas Miko
Browse files

Fix flaky test: lockscreenVisibilityWithScenes

The state is sometimes Idle(Lockscreen) and sometimes Idle(Gone). Force
Lockscreen before asserting it.

Test: TEST_ONLY
Bug: 378766637
Flag: TEST_ONLY
Change-Id: I576bb3dd6005e91cd616ef4ffbcb97c57e16dd86
parent 7a5c3845
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -52,7 +52,6 @@ import kotlinx.coroutines.flow.map
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
import org.junit.Before
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith

@@ -884,7 +883,6 @@ class WindowManagerLockscreenVisibilityInteractorTest : SysuiTestCase() {

    @Test
    @EnableSceneContainer
    @Ignore("b/378766637")
    fun lockscreenVisibilityWithScenes() =
        testScope.runTest {
            val isDeviceUnlocked by
@@ -893,6 +891,7 @@ class WindowManagerLockscreenVisibilityInteractorTest : SysuiTestCase() {
                )
            assertThat(isDeviceUnlocked).isFalse()

            kosmos.setSceneTransition(Idle(Scenes.Lockscreen))
            val currentScene by collectLastValue(kosmos.sceneInteractor.currentScene)
            assertThat(currentScene).isEqualTo(Scenes.Lockscreen)