Loading packages/SystemUI/multivalentTests/src/com/android/systemui/scene/SceneFrameworkIntegrationTest.kt +168 −248 File changed.Preview size limit exceeded, changes collapsed. Show changes packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenUserActionsViewModelKosmos.kt 0 → 100644 +31 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.keyguard.ui.viewmodel import com.android.systemui.communal.domain.interactor.communalInteractor import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.Kosmos.Fixture import com.android.systemui.shade.domain.interactor.shadeInteractor val Kosmos.lockscreenUserActionsViewModel by Fixture { LockscreenUserActionsViewModel( deviceEntryInteractor = deviceEntryInteractor, communalInteractor = communalInteractor, shadeInteractor = shadeInteractor, ) } packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneKosmos.kt +24 −0 Original line number Diff line number Diff line package com.android.systemui.scene import com.android.compose.animation.scene.ObservableTransitionState import com.android.systemui.classifier.domain.interactor.falsingInteractor import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.Kosmos.Fixture import com.android.systemui.power.domain.interactor.powerInteractor import com.android.systemui.scene.domain.interactor.sceneInteractor import com.android.systemui.scene.shared.logger.sceneLogger import com.android.systemui.scene.shared.model.Overlays import com.android.systemui.scene.shared.model.SceneContainerConfig import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.scene.ui.FakeOverlay import com.android.systemui.scene.ui.viewmodel.SceneContainerViewModel import kotlinx.coroutines.flow.MutableStateFlow var Kosmos.sceneKeys by Fixture { listOf( Loading Loading @@ -51,3 +58,20 @@ var Kosmos.sceneContainerConfig by Fixture { navigationDistances = navigationDistances, ) } val Kosmos.transitionState by Fixture { MutableStateFlow<ObservableTransitionState>( ObservableTransitionState.Idle(sceneContainerConfig.initialSceneKey) ) } val Kosmos.sceneContainerViewModel by Fixture { SceneContainerViewModel( sceneInteractor = sceneInteractor, falsingInteractor = falsingInteractor, powerInteractor = powerInteractor, motionEventHandlerReceiver = {}, logger = sceneLogger ) .apply { setTransitionState(transitionState) } } packages/SystemUI/tests/utils/src/com/android/telecom/TelecomManagerKosmos.kt +2 −1 Original line number Diff line number Diff line Loading @@ -21,4 +21,5 @@ import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.Kosmos.Fixture import com.android.systemui.util.mockito.mock var Kosmos.telecomManager by Fixture<TelecomManager?> { mock() } val Kosmos.mockTelecomManager by Fixture<TelecomManager> { mock() } var Kosmos.telecomManager by Fixture<TelecomManager?> { mockTelecomManager } Loading
packages/SystemUI/multivalentTests/src/com/android/systemui/scene/SceneFrameworkIntegrationTest.kt +168 −248 File changed.Preview size limit exceeded, changes collapsed. Show changes
packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/ui/viewmodel/LockscreenUserActionsViewModelKosmos.kt 0 → 100644 +31 −0 Original line number Diff line number Diff line /* * Copyright (C) 2024 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.systemui.keyguard.ui.viewmodel import com.android.systemui.communal.domain.interactor.communalInteractor import com.android.systemui.deviceentry.domain.interactor.deviceEntryInteractor import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.Kosmos.Fixture import com.android.systemui.shade.domain.interactor.shadeInteractor val Kosmos.lockscreenUserActionsViewModel by Fixture { LockscreenUserActionsViewModel( deviceEntryInteractor = deviceEntryInteractor, communalInteractor = communalInteractor, shadeInteractor = shadeInteractor, ) }
packages/SystemUI/tests/utils/src/com/android/systemui/scene/SceneKosmos.kt +24 −0 Original line number Diff line number Diff line package com.android.systemui.scene import com.android.compose.animation.scene.ObservableTransitionState import com.android.systemui.classifier.domain.interactor.falsingInteractor import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.Kosmos.Fixture import com.android.systemui.power.domain.interactor.powerInteractor import com.android.systemui.scene.domain.interactor.sceneInteractor import com.android.systemui.scene.shared.logger.sceneLogger import com.android.systemui.scene.shared.model.Overlays import com.android.systemui.scene.shared.model.SceneContainerConfig import com.android.systemui.scene.shared.model.Scenes import com.android.systemui.scene.ui.FakeOverlay import com.android.systemui.scene.ui.viewmodel.SceneContainerViewModel import kotlinx.coroutines.flow.MutableStateFlow var Kosmos.sceneKeys by Fixture { listOf( Loading Loading @@ -51,3 +58,20 @@ var Kosmos.sceneContainerConfig by Fixture { navigationDistances = navigationDistances, ) } val Kosmos.transitionState by Fixture { MutableStateFlow<ObservableTransitionState>( ObservableTransitionState.Idle(sceneContainerConfig.initialSceneKey) ) } val Kosmos.sceneContainerViewModel by Fixture { SceneContainerViewModel( sceneInteractor = sceneInteractor, falsingInteractor = falsingInteractor, powerInteractor = powerInteractor, motionEventHandlerReceiver = {}, logger = sceneLogger ) .apply { setTransitionState(transitionState) } }
packages/SystemUI/tests/utils/src/com/android/telecom/TelecomManagerKosmos.kt +2 −1 Original line number Diff line number Diff line Loading @@ -21,4 +21,5 @@ import com.android.systemui.kosmos.Kosmos import com.android.systemui.kosmos.Kosmos.Fixture import com.android.systemui.util.mockito.mock var Kosmos.telecomManager by Fixture<TelecomManager?> { mock() } val Kosmos.mockTelecomManager by Fixture<TelecomManager> { mock() } var Kosmos.telecomManager by Fixture<TelecomManager?> { mockTelecomManager }