FFs can now be toggled in release builds too (#3101)

- Removed `StaticFeatureFlagProvider`.
- Always provide `PreferencesFeatureFlagProvider`.
- For the default values of feature flags, use a lambda with a `BuildMeta` parameter so we can customize the return value based on its data.
This commit is contained in:
Jorge Martin Espinosa 2024-07-02 18:06:42 +02:00 committed by GitHub
parent 4757aac8b8
commit 32a374d836
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 118 additions and 118 deletions

View file

@ -35,13 +35,18 @@ class OnBoardingPresenterTest {
@Test
fun `present - initial state`() = runTest {
val buildMeta = aBuildMeta(
applicationName = "A",
productionApplicationName = "B",
desktopApplicationName = "C",
)
val featureFlagService = FakeFeatureFlagService(
initialState = mapOf(FeatureFlags.QrCodeLogin.key to true),
buildMeta = buildMeta,
)
val presenter = OnBoardingPresenter(
buildMeta = aBuildMeta(
applicationName = "A",
productionApplicationName = "B",
desktopApplicationName = "C",
),
featureFlagService = FakeFeatureFlagService(initialState = mapOf(FeatureFlags.QrCodeLogin.name to true)),
buildMeta = buildMeta,
featureFlagService = featureFlagService,
)
moleculeFlow(RecompositionMode.Immediate) {
presenter.present()