[flexiglass] Fix HubOnboardingInteractorTest with SceneContainerFlag
The failure occurred because `shouldShowHubOnboarding` depends on `CommunalSceneInteractor.isIdleOnCommunal`. When `SceneContainerFlag` is disabled, `isIdleOnCommunal` expects the current scene to be `CommunalScenes.Communal` (the legacy scene key). The previous test setup using `setIdleScene(Scenes.Communal)` (the new scene key) did not correctly make `isIdleOnCommunal` true for the legacy path. A new helper function `initializeUnderTest(isV2Enabled: Boolean)` was introduced. This function sets `kosmos.forceCommunalV2FlagState` and then initializes the `underTest` (HubOnboardingInteractor) instance. With `isIdleOnCommunal` now correctly true, and other conditions (V2 flag enabled, onboarding not dismissed) met, it should expect ture (not false): `assertThat(shouldShowHubOnboarding).isTrue()` Bug: 419897422 Flag: com.android.systemui.scene_container Test: com.android.systemui.communal.domain.interactor.HubOnboardingInteractorTest Change-Id: Ib9514741f6b290fdb0655900b800359ce1ccf4e3
Loading
Please register or sign in to comment