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

Commit 6e54cbd1 authored by Mykola Podolian's avatar Mykola Podolian Committed by Android (Google) Code Review
Browse files

Merge "Added DisableFlags annotation for failing test" into main

parents 90dafe43 89477299
Loading
Loading
Loading
Loading
+29 −0
Original line number Diff line number Diff line
@@ -240,6 +240,7 @@ class BubbleStackViewTest {
        assertThat(bubbleStackViewManager.onImeHidden).isNull()
    }

    @DisableFlags(Flags.FLAG_FIX_BUBBLES_EXPANDED_SYSUI_FLAG)
    @Test
    fun expandStack_waitsForIme() {
        val bubble = createAndInflateBubble()
@@ -269,6 +270,34 @@ class BubbleStackViewTest {
        }
    }

    @EnableFlags(Flags.FLAG_FIX_BUBBLES_EXPANDED_SYSUI_FLAG)
    @Test
    fun expandStack_sysUiProxyNotifiedImmediately() {
        val bubble = createAndInflateBubble()

        InstrumentationRegistry.getInstrumentation().runOnMainSync {
            bubbleStackView.addBubble(bubble)
        }

        InstrumentationRegistry.getInstrumentation().waitForIdleSync()
        assertThat(bubbleStackView.bubbleCount).isEqualTo(1)

        positioner.setImeVisible(true, 100)

        InstrumentationRegistry.getInstrumentation().runOnMainSync {
            // simulate a request from the bubble data listener to expand the stack
            bubbleStackView.isExpanded = true
        }

        val onImeHidden = bubbleStackViewManager.onImeHidden
        assertThat(onImeHidden).isNotNull()
        verify(sysuiProxy).onStackExpandChanged(true)
        InstrumentationRegistry.getInstrumentation().runOnMainSync {
            onImeHidden!!.run()
            shellExecutor.flushAll()
        }
    }

    @DisableFlags(Flags.FLAG_FIX_BUBBLES_EXPANDED_SYSUI_FLAG)
    @Test
    fun collapseStack_waitsForIme() {