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

Commit cd242a65 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[AI TestGen] Test: Add test for bubble bar overflow expanded view" into main

parents 4132fea6 64de4857
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -291,6 +291,26 @@ class BubbleBarExpandedViewTest {
        assertThat(endRunnableRun).isTrue()
    }

    @Test
    fun initialize_forOverflow_hidesCaptionAndHandle() {
        val overflowExpandedView = LayoutInflater.from(context).inflate(
                R.layout.bubble_bar_expanded_view, null, false /* attachToRoot */
        ) as BubbleBarExpandedView
        overflowExpandedView.bubbleLogger = BubbleLogger(uiEventLoggerFake)

        overflowExpandedView.initialize(
                expandedViewManager,
                positioner,
                true /* isOverflow */,
                null, /* bubble */
                null /* bubbleTaskView */
        )

        val captionView = overflowExpandedView.findViewById<View>(R.id.bubble_bar_caption_view)
        assertThat(captionView.visibility).isEqualTo(View.GONE)
        assertThat(overflowExpandedView.handleView.visibility).isEqualTo(View.GONE)
    }

    private fun BubbleBarExpandedView.menuView(): BubbleBarMenuView {
        return findViewByPredicate { it is BubbleBarMenuView }
    }