Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c260e9c4 authored by Jiaming Cheng's avatar Jiaming Cheng
Browse files

[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
parent 4cb20f20
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment