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

Commit 562939fd authored by lyn's avatar lyn
Browse files

Test that bundle notif child is not promoted

Bug: 389839319
Test: this
Flag: TEST_ONLY
Change-Id: Ie8d4151771248973c1e7480543d6d8155389f13d
parent d8ac0c18
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -967,6 +967,27 @@ public class ShadeListBuilderTest extends SysuiTestCase {
        );
    }

    @Test
    @EnableFlags(NotificationBundleUi.FLAG_NAME)
    public void testBundle_notifNotPromoted() {
        final int promotableId = 123;

        IdPromoter idPromoter = spy(new IdPromoter(promotableId));
        mListBuilder.addPromoter(idPromoter);
        mListBuilder.setBundler(TestBundler.INSTANCE);

        addNotif(0, PACKAGE_1, BUNDLE_1)
                .setId(promotableId);
        dispatchBuild();

        verifyBuiltList(
                bundle(BUNDLE_1, notif(0))
        );

        NotificationEntry promotableEntry = mEntrySet.get(0);
        verify(idPromoter, never()).shouldPromoteToTopLevel(eq(promotableEntry));
    }

    @Test
    @EnableFlags(NotificationBundleUi.FLAG_NAME)
    public void testBundle_groupChildrenAreSorted() {