DO NOT MERGE Adding tests for updated EmptyShadeView logic
Tests for ag/22688474
Bug: 267060171
Test: tests run
Change-Id: I35ba4652a125c8c83e18138f0fb0a51f3ef65b73
(cherry picked from commit 6a19675b12)
This commit is contained in:
@@ -294,6 +294,34 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase {
|
|||||||
/* notifVisibleInShade= */ false);
|
/* notifVisibleInShade= */ false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testUpdateEmptyShadeView_bouncerShowing_hideEmptyView() {
|
||||||
|
when(mZenModeController.areNotificationsHiddenInShade()).thenReturn(false);
|
||||||
|
mController.attach(mNotificationStackScrollLayout);
|
||||||
|
|
||||||
|
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);
|
||||||
|
mController.attach(mNotificationStackScrollLayout);
|
||||||
|
|
||||||
|
when(mCentralSurfaces.isBouncerShowing()).thenReturn(false);
|
||||||
|
setupShowEmptyShadeViewState(true);
|
||||||
|
reset(mNotificationStackScrollLayout);
|
||||||
|
mController.updateShowEmptyShadeView();
|
||||||
|
verify(mNotificationStackScrollLayout).updateEmptyShadeView(
|
||||||
|
/* visible= */ true,
|
||||||
|
/* areNotificationsHiddenInShade= */ false);
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testOnUserChange_verifySensitiveProfile() {
|
public void testOnUserChange_verifySensitiveProfile() {
|
||||||
when(mNotificationLockscreenUserManager.isAnyProfilePublicMode()).thenReturn(true);
|
when(mNotificationLockscreenUserManager.isAnyProfilePublicMode()).thenReturn(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user