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

Commit ae8228ce authored by lyn's avatar lyn
Browse files

Flag guard bundle tests for RankingCoordinator

Fixes: 415099172
Fixes: 415098854
Test: this
Flag: TEST_ONLY
Change-Id: I57c8bbe6cad17a0228609641f6cf3d9b522db8cf
parent 0ed9e339
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ import com.android.systemui.statusbar.notification.collection.listbuilder.plugga
import com.android.systemui.statusbar.notification.collection.provider.HighPriorityProvider;
import com.android.systemui.statusbar.notification.collection.render.NodeController;
import com.android.systemui.statusbar.notification.collection.render.SectionHeaderController;
import com.android.systemui.statusbar.notification.shared.NotificationBundleUi;

import org.junit.Before;
import org.junit.Test;
@@ -157,6 +158,7 @@ public class RankingCoordinatorTest extends SysuiTestCase {
    }

    @Test
    @EnableFlags(NotificationBundleUi.FLAG_NAME)
    public void testSilentHeader_clearableBundle_enableClearSectionTrue() {
        // Set up bundle with clearable listEntry child
        BundleEntry bundleEntry = new BundleEntry(BundleSpec.Companion.getNEWS());
@@ -314,6 +316,7 @@ public class RankingCoordinatorTest extends SysuiTestCase {
    }

    @Test
    @EnableFlags(NotificationBundleUi.FLAG_NAME)
    public void testSilentSectioner_accepts_bundle() {
        BundleEntry bundleEntry = new BundleEntry(BundleSpec.Companion.getNEWS());
        assertTrue(mSilentSectioner.isInSection(bundleEntry));
@@ -327,6 +330,7 @@ public class RankingCoordinatorTest extends SysuiTestCase {
    }

    @Test
    @EnableFlags(NotificationBundleUi.FLAG_NAME)
    public void testSilentSectionComparator_sortsBundlesByPrefixedKeys() {
        // This is the sorted order
        BundleEntry socialBundle = new BundleEntry(BundleSpec.Companion.getSOCIAL_MEDIA());
@@ -347,6 +351,7 @@ public class RankingCoordinatorTest extends SysuiTestCase {
    }

    @Test
    @EnableFlags(NotificationBundleUi.FLAG_NAME)
    public void testSilentSectionComparator_sortsBundlesBeforeNotifs() {
        BundleEntry bundleEntry = new BundleEntry(BundleSpec.Companion.getSOCIAL_MEDIA());
        int comparison = mSilentSectioner.getComparator().compare(bundleEntry, mEntry);
@@ -356,6 +361,7 @@ public class RankingCoordinatorTest extends SysuiTestCase {
    }

    @Test
    @EnableFlags(NotificationBundleUi.FLAG_NAME)
    public void testMinimizedSectioner_rejectsBundle() {
        BundleEntry bundleEntry = new BundleEntry(BundleSpec.Companion.getNEWS());
        assertFalse(mMinimizedSectioner.isInSection(bundleEntry));