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

Commit 95beaa2d authored by lyn's avatar lyn
Browse files

Test that clearable bundle enables clear section

Bug: 394483200
Test: this
Flag: TEST_ONLY
Change-Id: Idcb00e3f94db82d00cd96e2cef38f1e827d666e5
parent 1b7a84e2
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -154,6 +154,24 @@ public class RankingCoordinatorTest extends SysuiTestCase {
        verify(mSilentHeaderController).setClearSectionEnabled(eq(false));
    }

    @Test
    public void testSilentHeader_clearableBundle_enableClearSectionTrue() {
        // Set up bundle with clearable listEntry child
        BundleEntry bundleEntry = new BundleEntry(BundleSpec.Companion.getNEWS());
        ListEntry listEntry = new ListEntry(mEntry.getKey(), 0L) {
            @Nullable
            @Override
            public NotificationEntry getRepresentativeEntry() {
                return mEntry;
            }
        };
        setSbnClearable(true);
        bundleEntry.addChild(listEntry);

        mSilentSectioner.onEntriesUpdated(Arrays.asList(bundleEntry));
        verify(mSilentHeaderController).setClearSectionEnabled(eq(true));
    }

    @Test
    public void testUnfilteredState() {
        // GIVEN no suppressed visual effects + app not suspended