Skip to content

Commit 2a6f371

Browse files
Shawn LeeAndroid Build Coastguard Worker
authored andcommitted
DO NOT MERGE Adding tests for updated EmptyShadeView logic
Tests for ag/22688474 Bug: 267060171 Test: tests run (cherry picked from commit 6a19675) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e6fe1a0ef1ebb9123f4ed943c8470a873efbaada) Merged-In: I35ba4652a125c8c83e18138f0fb0a51f3ef65b73 Change-Id: I35ba4652a125c8c83e18138f0fb0a51f3ef65b73
1 parent e4abc45 commit 2a6f371

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayoutControllerTest.java

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,34 @@ public void testUpdateEmptyShadeView_splitShadeMode_alwaysShowEmptyView() {
294294
/* notifVisibleInShade= */ false);
295295
}
296296

297+
@Test
298+
public void testUpdateEmptyShadeView_bouncerShowing_hideEmptyView() {
299+
when(mZenModeController.areNotificationsHiddenInShade()).thenReturn(false);
300+
mController.attach(mNotificationStackScrollLayout);
301+
302+
when(mCentralSurfaces.isBouncerShowing()).thenReturn(true);
303+
setupShowEmptyShadeViewState(true);
304+
reset(mNotificationStackScrollLayout);
305+
mController.updateShowEmptyShadeView();
306+
verify(mNotificationStackScrollLayout).updateEmptyShadeView(
307+
/* visible= */ false,
308+
/* areNotificationsHiddenInShade= */ false);
309+
}
310+
311+
@Test
312+
public void testUpdateEmptyShadeView_bouncerNotShowing_showEmptyView() {
313+
when(mZenModeController.areNotificationsHiddenInShade()).thenReturn(false);
314+
mController.attach(mNotificationStackScrollLayout);
315+
316+
when(mCentralSurfaces.isBouncerShowing()).thenReturn(false);
317+
setupShowEmptyShadeViewState(true);
318+
reset(mNotificationStackScrollLayout);
319+
mController.updateShowEmptyShadeView();
320+
verify(mNotificationStackScrollLayout).updateEmptyShadeView(
321+
/* visible= */ true,
322+
/* areNotificationsHiddenInShade= */ false);
323+
}
324+
297325
@Test
298326
public void testOnUserChange_verifySensitiveProfile() {
299327
when(mNotificationLockscreenUserManager.isAnyProfilePublicMode()).thenReturn(true);

0 commit comments

Comments
 (0)