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

Commit 0baa1607 authored by Shawn Lee's avatar Shawn Lee Committed by Automerger Merge Worker
Browse files

Merge "Adding tests for updated EmptyShadeView logic" into udc-dev am: c468a9f9

parents 2cec071a c468a9f9
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -254,6 +254,34 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase {
                /* notifVisibleInShade= */ false);
    }

    @Test
    public void testUpdateEmptyShadeView_bouncerShowing_hideEmptyView() {
        when(mZenModeController.areNotificationsHiddenInShade()).thenReturn(false);
        initController(/* viewIsAttached= */ true);

        when(mCentralSurfaces.isBouncerShowing()).thenReturn(true);
        setupShowEmptyShadeViewState(true);
        reset(mNotificationStackScrollLayout);
        mController.updateShowEmptyShadeView();
        verify(mNotificationStackScrollLayout).updateEmptyShadeView(
                /* visible= */ false,
                /* areNotificationsHiddenInShade= */ false);
    }

    @Test
    public void testUpdateEmptyShadeView_bouncerNotShowing_showEmptyView() {
        when(mZenModeController.areNotificationsHiddenInShade()).thenReturn(false);
        initController(/* viewIsAttached= */ true);

        when(mCentralSurfaces.isBouncerShowing()).thenReturn(false);
        setupShowEmptyShadeViewState(true);
        reset(mNotificationStackScrollLayout);
        mController.updateShowEmptyShadeView();
        verify(mNotificationStackScrollLayout).updateEmptyShadeView(
                /* visible= */ true,
                /* areNotificationsHiddenInShade= */ false);
    }

    @Test
    public void testOnUserChange_verifySensitiveProfile() {
        when(mNotificationLockscreenUserManager.isAnyProfilePublicMode()).thenReturn(true);