File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
main/java/org/wordpress/android/support/main/ui
test/java/org/wordpress/android/support/main/ui Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import kotlinx.coroutines.flow.StateFlow
1010import kotlinx.coroutines.flow.asSharedFlow
1111import kotlinx.coroutines.flow.asStateFlow
1212import kotlinx.coroutines.launch
13+ import org.wordpress.android.BuildConfig
1314import org.wordpress.android.fluxc.store.AccountStore
1415import org.wordpress.android.fluxc.utils.AppLogWrapper
1516import org.wordpress.android.support.common.model.UserInfo
@@ -58,8 +59,8 @@ class SupportViewModel @Inject constructor(
5859 )
5960
6061 _optionsVisibility .value = SupportOptionsVisibility (
61- showAskTheBots = hasAccessToken,
62- showAskHappinessEngineers = hasAccessToken
62+ showAskTheBots = hasAccessToken && BuildConfig . IS_JETPACK_APP ,
63+ showAskHappinessEngineers = hasAccessToken && BuildConfig . IS_JETPACK_APP
6364 )
6465 }
6566
Original file line number Diff line number Diff line change @@ -142,8 +142,13 @@ class SupportViewModelTest : BaseUnitTest() {
142142 viewModel.init ()
143143
144144 // Then
145- assertThat(viewModel.optionsVisibility.value.showAskTheBots).isTrue()
146- assertThat(viewModel.optionsVisibility.value.showAskHappinessEngineers).isTrue()
145+ // Note: For WordPress variant (IS_JETPACK_APP=false), these options should be hidden
146+ // For Jetpack variant (IS_JETPACK_APP=true), they should be shown when user has access token
147+ // This test will behave differently based on which variant is being tested
148+ assertThat(viewModel.optionsVisibility.value.showAskTheBots)
149+ .isEqualTo(org.wordpress.android.BuildConfig .IS_JETPACK_APP )
150+ assertThat(viewModel.optionsVisibility.value.showAskHappinessEngineers)
151+ .isEqualTo(org.wordpress.android.BuildConfig .IS_JETPACK_APP )
147152 }
148153
149154 @Test
You can’t perform that action at this time.
0 commit comments