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

This commit is contained in:
Shawn Lee
2023-04-20 18:19:22 +00:00
committed by Android (Google) Code Review

View File

@@ -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);