Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/domain/interactor/SingleNotificationChipInteractorTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -28,9 +28,9 @@ import com.android.systemui.kosmos.collectLastValue import com.android.systemui.kosmos.runTest import com.android.systemui.kosmos.useUnconfinedTestDispatcher import com.android.systemui.statusbar.StatusBarIconView import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips import com.android.systemui.statusbar.core.StatusBarConnectedDisplays import com.android.systemui.statusbar.notification.data.model.activeNotificationModel import com.android.systemui.statusbar.notification.promoted.PromotedNotificationUi import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentBuilder import com.android.systemui.testKosmos import com.android.systemui.util.time.fakeSystemClock Loading @@ -41,7 +41,7 @@ import org.mockito.kotlin.mock @SmallTest @RunWith(AndroidJUnit4::class) @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) class SingleNotificationChipInteractorTest : SysuiTestCase() { private val kosmos = testKosmos().useUnconfinedTestDispatcher() val factory = kosmos.singleNotificationChipInteractorFactory Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/domain/interactor/StatusBarNotificationChipsInteractorTest.kt +19 −19 Original line number Diff line number Diff line Loading @@ -29,13 +29,13 @@ import com.android.systemui.kosmos.collectValues import com.android.systemui.kosmos.runTest import com.android.systemui.kosmos.useUnconfinedTestDispatcher import com.android.systemui.statusbar.StatusBarIconView import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips import com.android.systemui.statusbar.core.StatusBarConnectedDisplays import com.android.systemui.statusbar.notification.data.model.activeNotificationModel import com.android.systemui.statusbar.notification.data.repository.ActiveNotificationsStore import com.android.systemui.statusbar.notification.data.repository.activeNotificationListRepository import com.android.systemui.statusbar.notification.data.repository.addNotif import com.android.systemui.statusbar.notification.data.repository.removeNotif import com.android.systemui.statusbar.notification.promoted.PromotedNotificationUi import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentBuilder import com.android.systemui.statusbar.notification.shared.ActiveNotificationModel import com.android.systemui.statusbar.notification.shared.CallType Loading @@ -55,7 +55,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { Kosmos.Fixture { statusBarNotificationChipsInteractor.also { it.start() } } @Test @DisableFlags(StatusBarNotifChips.FLAG_NAME) @DisableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_flagOff_noNotifs() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading @@ -74,7 +74,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_noNotifs_empty() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading @@ -85,7 +85,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) @DisableFlags(StatusBarConnectedDisplays.FLAG_NAME) fun allNotificationChips_notifMissingStatusBarChipIconView_cdFlagOff_empty() = kosmos.runTest { Loading @@ -105,7 +105,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME, StatusBarConnectedDisplays.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME, StatusBarConnectedDisplays.FLAG_NAME) fun allNotificationChips_notifMissingStatusBarChipIconView_cdFlagOn_notEmpty() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading @@ -124,7 +124,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_onePromotedNotif_statusBarIconViewMatches() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading @@ -146,7 +146,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_onlyForPromotedNotifs() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -181,7 +181,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_appVisibilityInfoCorrect() = kosmos.runTest { activityManagerRepository.fake.startingIsAppVisibleValue = false Loading Loading @@ -215,7 +215,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { /** Regression test for b/388521980. */ @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_callNotifIsAlsoPromoted_callNotifExcluded() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -245,7 +245,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_notifUpdatesGoThrough() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -295,7 +295,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_promotedNotifDisappearsThenReappears() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -337,7 +337,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_sortedByFirstAppearanceTime() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -413,7 +413,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_lastAppVisibleTimeMaintainedAcrossNotifAddsAndRemoves() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -468,7 +468,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_sortedByLastAppVisibleTime() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -524,7 +524,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_newNotificationTakesPriorityOverLastAppVisible() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -580,7 +580,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_fullSort() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -695,7 +695,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_notifChangesKey() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -733,7 +733,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun onPromotedNotificationChipTapped_emitsKeys() = kosmos.runTest { val latest by collectValues(underTest.promotedNotificationChipTapEvent) Loading @@ -750,7 +750,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun onPromotedNotificationChipTapped_sameKeyTwice_emitsTwice() = kosmos.runTest { val latest by collectValues(underTest.promotedNotificationChipTapEvent) Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModelTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ import com.android.systemui.kosmos.useUnconfinedTestDispatcher import com.android.systemui.statusbar.StatusBarIconView import com.android.systemui.statusbar.chips.call.ui.viewmodel.CallChipViewModelTest.Companion.createStatusBarIconViewOrNull import com.android.systemui.statusbar.chips.notification.domain.interactor.statusBarNotificationChipsInteractor import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips import com.android.systemui.statusbar.chips.ui.model.ColorsModel import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel import com.android.systemui.statusbar.core.StatusBarConnectedDisplays Loading @@ -46,6 +45,7 @@ import com.android.systemui.statusbar.notification.data.repository.ActiveNotific import com.android.systemui.statusbar.notification.data.repository.UnconfinedFakeHeadsUpRowRepository import com.android.systemui.statusbar.notification.data.repository.activeNotificationListRepository import com.android.systemui.statusbar.notification.headsup.PinnedStatus import com.android.systemui.statusbar.notification.promoted.PromotedNotificationUi import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentBuilder import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentModel import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentModel.When Loading @@ -66,7 +66,7 @@ import org.mockito.kotlin.mock @SmallTest @RunWith(AndroidJUnit4::class) @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) class NotifChipsViewModelTest : SysuiTestCase() { private val kosmos = testKosmos().useUnconfinedTestDispatcher().apply { Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelTest.kt +3 −3 Original line number Diff line number Diff line Loading @@ -44,12 +44,12 @@ import com.android.systemui.screenrecord.data.repository.screenRecordRepository import com.android.systemui.statusbar.chips.call.ui.viewmodel.CallChipViewModel import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.MediaProjectionChipInteractorTest.Companion.NORMAL_PACKAGE import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.MediaProjectionChipInteractorTest.Companion.setUpPackageManagerForMediaProjection import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips import com.android.systemui.statusbar.chips.screenrecord.ui.viewmodel.ScreenRecordChipViewModel import com.android.systemui.statusbar.chips.sharetoapp.ui.viewmodel.ShareToAppChipViewModel import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel import com.android.systemui.statusbar.chips.ui.view.ChipBackgroundContainer import com.android.systemui.statusbar.core.StatusBarConnectedDisplays import com.android.systemui.statusbar.notification.promoted.PromotedNotificationUi import com.android.systemui.statusbar.phone.SystemUIDialog import com.android.systemui.statusbar.phone.mockSystemUIDialogFactory import com.android.systemui.statusbar.phone.ongoingcall.StatusBarChipsModernization Loading @@ -71,10 +71,10 @@ import org.mockito.kotlin.mock import org.mockito.kotlin.verify import org.mockito.kotlin.whenever /** Tests for [OngoingActivityChipsViewModel] when the [StatusBarNotifChips] flag is disabled. */ /** Tests for [OngoingActivityChipsViewModel] when the [PromotedNotificationUi] flag is disabled. */ @SmallTest @RunWith(AndroidJUnit4::class) @DisableFlags(StatusBarNotifChips.FLAG_NAME) @DisableFlags(PromotedNotificationUi.FLAG_NAME) class OngoingActivityChipsViewModelTest : SysuiTestCase() { private val kosmos = testKosmos().useUnconfinedTestDispatcher() private val systemClock = kosmos.fakeSystemClock Loading packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsWithNotifsViewModelTest.kt +3 −3 Original line number Diff line number Diff line Loading @@ -47,7 +47,6 @@ import com.android.systemui.statusbar.chips.call.ui.viewmodel.CallChipViewModelT import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.MediaProjectionChipInteractorTest.Companion.NORMAL_PACKAGE import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.MediaProjectionChipInteractorTest.Companion.setUpPackageManagerForMediaProjection import com.android.systemui.statusbar.chips.notification.domain.interactor.statusBarNotificationChipsInteractor import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips import com.android.systemui.statusbar.chips.notification.ui.viewmodel.NotifChipsViewModelTest.Companion.assertIsNotifChip import com.android.systemui.statusbar.chips.screenrecord.ui.viewmodel.ScreenRecordChipViewModel import com.android.systemui.statusbar.chips.ui.model.MultipleOngoingActivityChipsModel Loading @@ -64,6 +63,7 @@ import com.android.systemui.statusbar.notification.data.repository.activeNotific import com.android.systemui.statusbar.notification.data.repository.addNotif import com.android.systemui.statusbar.notification.data.repository.addNotifs import com.android.systemui.statusbar.notification.data.repository.removeNotif import com.android.systemui.statusbar.notification.promoted.PromotedNotificationUi import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentBuilder import com.android.systemui.statusbar.notification.shared.ActiveNotificationModel import com.android.systemui.statusbar.phone.SystemUIDialog Loading @@ -85,10 +85,10 @@ import org.mockito.kotlin.mock import org.mockito.kotlin.whenever // TODO(b/273205603): add tests for Active chips with hidden=true once actually used. /** Tests for [OngoingActivityChipsViewModel] when the [StatusBarNotifChips] flag is enabled. */ /** Tests for [OngoingActivityChipsViewModel] when the [PromotedNotificationUi] flag is enabled. */ @SmallTest @RunWith(AndroidJUnit4::class) @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) class OngoingActivityChipsWithNotifsViewModelTest : SysuiTestCase() { private val kosmos = testKosmos().useUnconfinedTestDispatcher() private val systemClock = kosmos.fakeSystemClock Loading Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/domain/interactor/SingleNotificationChipInteractorTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -28,9 +28,9 @@ import com.android.systemui.kosmos.collectLastValue import com.android.systemui.kosmos.runTest import com.android.systemui.kosmos.useUnconfinedTestDispatcher import com.android.systemui.statusbar.StatusBarIconView import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips import com.android.systemui.statusbar.core.StatusBarConnectedDisplays import com.android.systemui.statusbar.notification.data.model.activeNotificationModel import com.android.systemui.statusbar.notification.promoted.PromotedNotificationUi import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentBuilder import com.android.systemui.testKosmos import com.android.systemui.util.time.fakeSystemClock Loading @@ -41,7 +41,7 @@ import org.mockito.kotlin.mock @SmallTest @RunWith(AndroidJUnit4::class) @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) class SingleNotificationChipInteractorTest : SysuiTestCase() { private val kosmos = testKosmos().useUnconfinedTestDispatcher() val factory = kosmos.singleNotificationChipInteractorFactory Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/domain/interactor/StatusBarNotificationChipsInteractorTest.kt +19 −19 Original line number Diff line number Diff line Loading @@ -29,13 +29,13 @@ import com.android.systemui.kosmos.collectValues import com.android.systemui.kosmos.runTest import com.android.systemui.kosmos.useUnconfinedTestDispatcher import com.android.systemui.statusbar.StatusBarIconView import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips import com.android.systemui.statusbar.core.StatusBarConnectedDisplays import com.android.systemui.statusbar.notification.data.model.activeNotificationModel import com.android.systemui.statusbar.notification.data.repository.ActiveNotificationsStore import com.android.systemui.statusbar.notification.data.repository.activeNotificationListRepository import com.android.systemui.statusbar.notification.data.repository.addNotif import com.android.systemui.statusbar.notification.data.repository.removeNotif import com.android.systemui.statusbar.notification.promoted.PromotedNotificationUi import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentBuilder import com.android.systemui.statusbar.notification.shared.ActiveNotificationModel import com.android.systemui.statusbar.notification.shared.CallType Loading @@ -55,7 +55,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { Kosmos.Fixture { statusBarNotificationChipsInteractor.also { it.start() } } @Test @DisableFlags(StatusBarNotifChips.FLAG_NAME) @DisableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_flagOff_noNotifs() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading @@ -74,7 +74,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_noNotifs_empty() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading @@ -85,7 +85,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) @DisableFlags(StatusBarConnectedDisplays.FLAG_NAME) fun allNotificationChips_notifMissingStatusBarChipIconView_cdFlagOff_empty() = kosmos.runTest { Loading @@ -105,7 +105,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME, StatusBarConnectedDisplays.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME, StatusBarConnectedDisplays.FLAG_NAME) fun allNotificationChips_notifMissingStatusBarChipIconView_cdFlagOn_notEmpty() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading @@ -124,7 +124,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_onePromotedNotif_statusBarIconViewMatches() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading @@ -146,7 +146,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_onlyForPromotedNotifs() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -181,7 +181,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_appVisibilityInfoCorrect() = kosmos.runTest { activityManagerRepository.fake.startingIsAppVisibleValue = false Loading Loading @@ -215,7 +215,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { /** Regression test for b/388521980. */ @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_callNotifIsAlsoPromoted_callNotifExcluded() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -245,7 +245,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_notifUpdatesGoThrough() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -295,7 +295,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_promotedNotifDisappearsThenReappears() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -337,7 +337,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_sortedByFirstAppearanceTime() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -413,7 +413,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_lastAppVisibleTimeMaintainedAcrossNotifAddsAndRemoves() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -468,7 +468,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_sortedByLastAppVisibleTime() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -524,7 +524,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_newNotificationTakesPriorityOverLastAppVisible() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -580,7 +580,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_fullSort() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -695,7 +695,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun allNotificationChips_notifChangesKey() = kosmos.runTest { val latest by collectLastValue(underTest.allNotificationChips) Loading Loading @@ -733,7 +733,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun onPromotedNotificationChipTapped_emitsKeys() = kosmos.runTest { val latest by collectValues(underTest.promotedNotificationChipTapEvent) Loading @@ -750,7 +750,7 @@ class StatusBarNotificationChipsInteractorTest : SysuiTestCase() { } @Test @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) fun onPromotedNotificationChipTapped_sameKeyTwice_emitsTwice() = kosmos.runTest { val latest by collectValues(underTest.promotedNotificationChipTapEvent) Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/notification/ui/viewmodel/NotifChipsViewModelTest.kt +2 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,6 @@ import com.android.systemui.kosmos.useUnconfinedTestDispatcher import com.android.systemui.statusbar.StatusBarIconView import com.android.systemui.statusbar.chips.call.ui.viewmodel.CallChipViewModelTest.Companion.createStatusBarIconViewOrNull import com.android.systemui.statusbar.chips.notification.domain.interactor.statusBarNotificationChipsInteractor import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips import com.android.systemui.statusbar.chips.ui.model.ColorsModel import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel import com.android.systemui.statusbar.core.StatusBarConnectedDisplays Loading @@ -46,6 +45,7 @@ import com.android.systemui.statusbar.notification.data.repository.ActiveNotific import com.android.systemui.statusbar.notification.data.repository.UnconfinedFakeHeadsUpRowRepository import com.android.systemui.statusbar.notification.data.repository.activeNotificationListRepository import com.android.systemui.statusbar.notification.headsup.PinnedStatus import com.android.systemui.statusbar.notification.promoted.PromotedNotificationUi import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentBuilder import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentModel import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentModel.When Loading @@ -66,7 +66,7 @@ import org.mockito.kotlin.mock @SmallTest @RunWith(AndroidJUnit4::class) @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) class NotifChipsViewModelTest : SysuiTestCase() { private val kosmos = testKosmos().useUnconfinedTestDispatcher().apply { Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsViewModelTest.kt +3 −3 Original line number Diff line number Diff line Loading @@ -44,12 +44,12 @@ import com.android.systemui.screenrecord.data.repository.screenRecordRepository import com.android.systemui.statusbar.chips.call.ui.viewmodel.CallChipViewModel import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.MediaProjectionChipInteractorTest.Companion.NORMAL_PACKAGE import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.MediaProjectionChipInteractorTest.Companion.setUpPackageManagerForMediaProjection import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips import com.android.systemui.statusbar.chips.screenrecord.ui.viewmodel.ScreenRecordChipViewModel import com.android.systemui.statusbar.chips.sharetoapp.ui.viewmodel.ShareToAppChipViewModel import com.android.systemui.statusbar.chips.ui.model.OngoingActivityChipModel import com.android.systemui.statusbar.chips.ui.view.ChipBackgroundContainer import com.android.systemui.statusbar.core.StatusBarConnectedDisplays import com.android.systemui.statusbar.notification.promoted.PromotedNotificationUi import com.android.systemui.statusbar.phone.SystemUIDialog import com.android.systemui.statusbar.phone.mockSystemUIDialogFactory import com.android.systemui.statusbar.phone.ongoingcall.StatusBarChipsModernization Loading @@ -71,10 +71,10 @@ import org.mockito.kotlin.mock import org.mockito.kotlin.verify import org.mockito.kotlin.whenever /** Tests for [OngoingActivityChipsViewModel] when the [StatusBarNotifChips] flag is disabled. */ /** Tests for [OngoingActivityChipsViewModel] when the [PromotedNotificationUi] flag is disabled. */ @SmallTest @RunWith(AndroidJUnit4::class) @DisableFlags(StatusBarNotifChips.FLAG_NAME) @DisableFlags(PromotedNotificationUi.FLAG_NAME) class OngoingActivityChipsViewModelTest : SysuiTestCase() { private val kosmos = testKosmos().useUnconfinedTestDispatcher() private val systemClock = kosmos.fakeSystemClock Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/statusbar/chips/ui/viewmodel/OngoingActivityChipsWithNotifsViewModelTest.kt +3 −3 Original line number Diff line number Diff line Loading @@ -47,7 +47,6 @@ import com.android.systemui.statusbar.chips.call.ui.viewmodel.CallChipViewModelT import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.MediaProjectionChipInteractorTest.Companion.NORMAL_PACKAGE import com.android.systemui.statusbar.chips.mediaprojection.domain.interactor.MediaProjectionChipInteractorTest.Companion.setUpPackageManagerForMediaProjection import com.android.systemui.statusbar.chips.notification.domain.interactor.statusBarNotificationChipsInteractor import com.android.systemui.statusbar.chips.notification.shared.StatusBarNotifChips import com.android.systemui.statusbar.chips.notification.ui.viewmodel.NotifChipsViewModelTest.Companion.assertIsNotifChip import com.android.systemui.statusbar.chips.screenrecord.ui.viewmodel.ScreenRecordChipViewModel import com.android.systemui.statusbar.chips.ui.model.MultipleOngoingActivityChipsModel Loading @@ -64,6 +63,7 @@ import com.android.systemui.statusbar.notification.data.repository.activeNotific import com.android.systemui.statusbar.notification.data.repository.addNotif import com.android.systemui.statusbar.notification.data.repository.addNotifs import com.android.systemui.statusbar.notification.data.repository.removeNotif import com.android.systemui.statusbar.notification.promoted.PromotedNotificationUi import com.android.systemui.statusbar.notification.promoted.shared.model.PromotedNotificationContentBuilder import com.android.systemui.statusbar.notification.shared.ActiveNotificationModel import com.android.systemui.statusbar.phone.SystemUIDialog Loading @@ -85,10 +85,10 @@ import org.mockito.kotlin.mock import org.mockito.kotlin.whenever // TODO(b/273205603): add tests for Active chips with hidden=true once actually used. /** Tests for [OngoingActivityChipsViewModel] when the [StatusBarNotifChips] flag is enabled. */ /** Tests for [OngoingActivityChipsViewModel] when the [PromotedNotificationUi] flag is enabled. */ @SmallTest @RunWith(AndroidJUnit4::class) @EnableFlags(StatusBarNotifChips.FLAG_NAME) @EnableFlags(PromotedNotificationUi.FLAG_NAME) class OngoingActivityChipsWithNotifsViewModelTest : SysuiTestCase() { private val kosmos = testKosmos().useUnconfinedTestDispatcher() private val systemClock = kosmos.fakeSystemClock Loading