diff options
author | Shawn Lee <syeonlee@google.com> | 2023-04-18 14:39:39 -0700 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-04-26 02:35:34 +0000 |
commit | 6be2b4787b30f5091330bf0d6415a1ea84105516 (patch) | |
tree | 5827d8ed03e666e2f12a707c00836387ef70b215 | |
parent | aa95a94565813973ea7d63a8826e0bc1b358758c (diff) | |
download | base-6be2b4787b30f5091330bf0d6415a1ea84105516.tar.gz |
Adding tests for updated EmptyShadeView logic
Tests for ag/22688474
Bug: 267060171
Test: tests run
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:6a19675b120b497618259cbcdedde4ffb68389c8)
Merged-In: I35ba4652a125c8c83e18138f0fb0a51f3ef65b73
Change-Id: I35ba4652a125c8c83e18138f0fb0a51f3ef65b73
-rw-r--r-- | packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java index 45ae96c10345..fbfe51a89784 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java @@ -295,6 +295,34 @@ public class NotificationStackScrollLayoutControllerTest extends SysuiTestCase { } @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); |