Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [ANDROAPP-6175] TeiDataFragment keeps reloading in landscape #3649

Merged
merged 20 commits into from
May 23, 2024
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
e143799
version name 3.0
Balcan Apr 29, 2024
b1ecb06
version name 3.0 (#3605)
Balcan Apr 29, 2024
bb4231d
map is usable when card is first expanded to take full screen and the…
ferdyrod Apr 30, 2024
1db1471
fix: [ANDROAPP-6050] remove program name when scheduling event (#3596)
mmmateos Apr 30, 2024
4413076
[ANDROAPP-5701] Perform sync in local network (#3591)
andresmr Apr 30, 2024
87b9edf
update mobile-ui version (#3615)
ferdyrod Apr 30, 2024
92772f5
chore: [ANDROAPP-6139] Ignore flaky test (#3622)
xavimolloy May 6, 2024
cf550d8
chore: [ANDROAPP-6135] Update rule engine and expression parser to re…
xavimolloy May 7, 2024
f3a22a3
Update designSystem to release artifact 0.2 (#3627)
andresmr May 10, 2024
909c485
[ANDROAPP-6134] Update sdk release version to 1.10.0 (#3629)
Balcan May 10, 2024
92af8dd
[ANDROAPP-6161] Add server version 41 (#3630)
andresmr May 15, 2024
cdc73a6
[ANDROAPP-6162] Remove old form option (#3632)
andresmr May 16, 2024
1ce44bb
Create deploy_release.yml
Balcan May 20, 2024
8651881
Rename deploy_release.yml to deploy-release.yml
Balcan May 20, 2024
b813038
Update deploy-release.yml
Balcan May 20, 2024
61783a2
feat: [ANDROAPP-6165] add continuous-delivery job to github (#3650)
xavimolloy May 22, 2024
af6e427
[ANDROAPP-6175] TeiDataFragment keeps reloading in landscape
Balcan May 22, 2024
4f18ab0
[ANDROAPP-6175] Check if grouped events option is visible
Balcan May 22, 2024
a90dfbd
[ANDROAPP-6175] Ignore flaky test
Balcan May 22, 2024
214f345
Merge branch 'develop' into ANDROAPP-6175
andresmr May 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[ANDROAPP-6162] Remove old form option (#3632)
* [ANDROAPP-6162] Remove COMPOSE_FORM option

Signed-off-by: andresmr <[email protected]>

* [ANDROAPP-6162] Ignore flaky test

Signed-off-by: andresmr <[email protected]>

* [ANDROAPP-6162] Ignore flaky test

Signed-off-by: andresmr <[email protected]>

---------

Signed-off-by: andresmr <[email protected]>
andresmr authored and Balcan committed May 20, 2024
commit cdc73a63de629c03e4f6473ad91c9887aefae4d9
4 changes: 3 additions & 1 deletion app/src/androidTest/java/org/dhis2/usescases/BaseTest.kt
Original file line number Diff line number Diff line change
@@ -169,12 +169,13 @@ open class BaseTest {
}

private fun disableComposeForms() {
preferencesRobot.saveValue(SET_FROM_TESTING, true)
preferencesRobot.saveValue(Feature.COMPOSE_FORMS.name, false)
}


fun enableComposeForms() {
preferencesRobot.saveValue("SET_FROM_DEVELOPMENT", true)
preferencesRobot.saveValue(SET_FROM_TESTING, true)
preferencesRobot.saveValue(Feature.COMPOSE_FORMS.name, true)
}

@@ -184,5 +185,6 @@ open class BaseTest {
val disableAnimationsTestRule = DisableAnimations()
const val MOCK_SERVER_URL = "http://127.0.0.1:8080"
const val API = "api"
const val SET_FROM_TESTING = "SET_FROM_TESTING"
}
}
Original file line number Diff line number Diff line change
@@ -53,6 +53,7 @@ class SyncFlowTest : BaseTest() {
ApplicationProvider.getApplicationContext<AppTest>().mutableWorkInfoStatuses
}

@Ignore("Flaky test, will be fixed in next release")
@Test
fun shouldShowErrorWhenTEISyncFails() {
mockWebServerRobot.addResponse(GET, "/api/system/ping", API_PING_RESPONSE_OK)
@@ -187,6 +188,7 @@ class SyncFlowTest : BaseTest() {
cleanLocalDatabase()
}

@Ignore("Flaky test, will be addressed in next release")
@Test
fun shouldShowErrorWhenSyncDataSetFails() {
prepareFacilityDataSetIntentAndLaunchActivity(ruleDataSet)
Original file line number Diff line number Diff line change
@@ -3,45 +3,36 @@ package org.dhis2.commons.featureconfig.data
import org.dhis2.commons.featureconfig.model.Feature
import org.dhis2.commons.featureconfig.model.FeatureState
import org.dhis2.commons.prefs.PreferenceProvider
import org.hisp.dhis.android.core.D2
import org.hisp.dhis.android.core.settings.ExperimentalFeature
import javax.inject.Inject

class FeatureConfigRepositoryImpl @Inject constructor(
val preferences: PreferenceProvider,
val d2: D2,
) : FeatureConfigRepository {

val SET_FROM_DEVELOPMENT = "SET_FROM_DEVELOPMENT"

override val featuresList: List<FeatureState>
get() = Feature.entries.map {
FeatureState(it, isFeatureEnable(it))
}
get() = Feature.entries
.filter { it.name != Feature.COMPOSE_FORMS.name }
.map { FeatureState(it, isFeatureEnable(it)) }

override fun updateItem(featureState: FeatureState) {
if (featureState.feature.name == Feature.COMPOSE_FORMS.name) {
preferences.setValue(SET_FROM_DEVELOPMENT, true)
}
preferences.setValue(featureState.feature.name, !featureState.enable)
}

override fun isFeatureEnable(feature: Feature): Boolean {
return when {
feature.name == Feature.COMPOSE_FORMS.name -> {
val fromDevelopment = preferences.getBoolean(SET_FROM_DEVELOPMENT, false)
val fromDevelopment = preferences.getBoolean("SET_FROM_TESTING", false)
if (fromDevelopment) {
preferences.getBoolean(feature.name, false)
} else if (d2.settingModule().generalSetting().blockingExists()) {
d2.settingModule().generalSetting()
.hasExperimentalFeature(ExperimentalFeature.NewFormLayout).blockingGet()
} else {
true
}
}

preferences.contains(feature.name) -> {
preferences.getBoolean(feature.name, false)
}

else -> false
}
}
Original file line number Diff line number Diff line change
@@ -5,15 +5,12 @@ import dagger.Provides
import org.dhis2.commons.featureconfig.data.FeatureConfigRepository
import org.dhis2.commons.featureconfig.data.FeatureConfigRepositoryImpl
import org.dhis2.commons.prefs.PreferenceProvider
import org.hisp.dhis.android.core.D2Manager

@Module
class FeatureConfigModule {

@Provides
fun provideRepository(preferenceProvider: PreferenceProvider): FeatureConfigRepository {
return FeatureConfigRepositoryImpl(preferenceProvider, provideD2())
return FeatureConfigRepositoryImpl(preferenceProvider)
}

private fun provideD2() = D2Manager.getD2()
}