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

Commit ea8406bd authored by Lyn Han's avatar Lyn Han Committed by Android (Google) Code Review
Browse files

Merge "Test that clearable bundle enables clear section" into main

parents b74b84d0 95beaa2d
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