Skip to content

Commit

Permalink
[EMISANDROI-37] updates to 3.0.0.1 (#29)
Browse files Browse the repository at this point in the history
* version name 3.0

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

* version name 3.0 (dhis2#3605)

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

* map is usable when card is first expanded to take full screen and then collapsed (dhis2#3601)

* fix: [ANDROAPP-6050] remove program name when scheduling event (dhis2#3596)

* [ANDROAPP-5701] Perform sync in local network (dhis2#3591)

* Perform sync in local network

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

* Perform sync in local network

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

---------

Signed-off-by: Pablo <[email protected]>
Co-authored-by: Pablo <[email protected]>

* update mobile-ui version (dhis2#3615)

* chore: [ANDROAPP-6139] Ignore flaky test (dhis2#3622)

* chore: [ANDROAPP-6139] ignoreflaky test

* fix: [ANDROAPP-6135] add ignore to shouldSuccessfullySyncSavedEvent

* chore: [ANDROAPP-6135] Update rule engine and expression parser to re… (dhis2#3623)

* chore: [ANDROAPP-6135] Update rule engine and expression parser to release version for 3.0

* chore: update rule-engine version 3.0.0

* fix: [ANDROAPP-6135] fix tests

---------

Co-authored-by: Victor Garcia <[email protected]>

* Update designSystem to release artifact 0.2 (dhis2#3627)

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

* [ANDROAPP-6134] Update sdk release version to 1.10.0 (dhis2#3629)

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

* [ANDROAPP-6161] Add server version 41 (dhis2#3630)

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

* [ANDROAPP-6162] Remove old form option (dhis2#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]>

* Create deploy_release.yml

placeholder workflow

* Rename deploy_release.yml to deploy-release.yml

* Update deploy-release.yml

* feat: [ANDROAPP-6165] add continuous-delivery job to github (dhis2#3650)

* fix: [ANDROAPP-6175] TeiDataFragment keeps reloading in landscape (dhis2#3647)

* [ANDROAPP-6175] TeiDataFragment keeps reloading in landscape

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

* [ANDROAPP-6175] Check if grouped events option is visible

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

* [ANDROAPP-6175] Ignore flaky test

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

---------

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

* ci: [ANDROAPP-6167] deploy release job

* ci: [ANDROAPP-6167] deploy release job

* ci: [ANDROAPP-6167] deploy release job

* update vCode

* build: 3.0 release (dhis2#3654)

* build: 3.0 release

* build: 3.0 release

* build: rename apk files

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

---------

Signed-off-by: Pablo <[email protected]>
Co-authored-by: Pablo <[email protected]>

* ci: Update version name to 3.0.0.1 and version code to 134

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

* fix: [ANDROAPP-6195] Add missing text resource keys (dhis2#3667)

* fix: [ANDROAPP-6195] Add missing text resource keys

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

* fix: [ANDROAPP-6195] remove duplicates and typos

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

* fix: [ANDROAPP-6195] remove duplicates

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

* fix: [ANDROAPP-6195] add missing transifex configuration

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

---------

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

* fix: [ANDROAPP-6194] Search outside the program (dhis2#3664)

* fix: [ANDROAPP-6194] Send fetched list as parameter to avoid duplicated on search

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

* fix: [ANDROAPP-6194] Send fetched list as parameter to avoid duplicated on search

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

* fix: [ANDROAPP-6194] Add mockedWebServer response to mock get tracked entity instances

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

---------

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

* fix: [ANDROAPP-6210] Manually instantiate resourceManager on BreakTheGlassBottomDialog (dhis2#3671)

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

* fix: missing translations (dhis2#3674)

* fix: missing translations

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

* fix: duplicated resources

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

---------

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

* chore: Update SDK to 1.10.0.1 (dhis2#3679)

* chore: Update SDK to 1.10.0.1-SNAPSHOT

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

* chore: Update SDK to 1.10.0.1

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

---------

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

* build: Update release notes

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

* fix: refactoring changes

* chore: klint checkstyle

* fix: setting semis verification on testing classes

---------

Signed-off-by: Pablo <[email protected]>
Signed-off-by: andresmr <[email protected]>
Co-authored-by: Pablo <[email protected]>
Co-authored-by: Ferdy Rodriguez <[email protected]>
Co-authored-by: Manu Muñoz <[email protected]>
Co-authored-by: Andrés Miguel Rubio <[email protected]>
Co-authored-by: Xavier Molloy <[email protected]>
Co-authored-by: Victor Garcia <[email protected]>
Co-authored-by: manu <[email protected]>
  • Loading branch information
8 people authored Jun 26, 2024
1 parent 70f634f commit b9a9065
Show file tree
Hide file tree
Showing 45 changed files with 832 additions and 394 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ${{ env.repository_name }} - Android APK
path: ${{ env.main_project_module }}/build/outputs/apk/dhis/release/dhis2-v${{ steps.read-version.outputs.vName }}-dhis-release.apk
path: ${{ env.main_project_module }}/build/outputs/apk/dhis/release/dhis2-v${{ steps.read-version.outputs.vName }}.apk
54 changes: 54 additions & 0 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Continuous Delivery

env:

main_project_module: app

on:
workflow_dispatch:
push:
branches:
- main
- develop
- release/*

jobs:
deployment_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# Set Current Date
- name: Set current date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT"

# Set Repository Name As Env Variable
- name: Set repository name as env variable
run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV

- name: Set Up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
cache: 'gradle'

- name: Change wrapper permissions
run: chmod +x ./gradlew

# Create APK Debug
- name: Build apk debug project (APK) - ${{ env.main_project_module }} module
run: ./gradlew assembleDhisDebug

- name: Read version name from file
working-directory: ./gradle
id: read-version
run: echo "vName=$(grep 'vName' libs.versions.toml | awk -F' = ' '{print $2}' | tr -d '"')" >> "$GITHUB_OUTPUT"

# Upload Artifact Build
- name: Upload Android artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.repository_name }} - Android APK - ${{ steps.date.outputs.date }}
path: ${{ env.main_project_module }}/build/outputs/apk/dhis/debug/dhis2-v${{ steps.read-version.outputs.vName }}-training.apk
2 changes: 1 addition & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: ${{ env.repository_name }} - Android APK
path: ${{ env.main_project_module }}/build/outputs/apk/dhis/debug/dhis2-v${{ steps.read-version.outputs.vName }}-dhis-debug.apk
path: ${{ env.main_project_module }}/build/outputs/apk/dhis/debug/dhis2-v${{ steps.read-version.outputs.vName }}-training.apk
92 changes: 92 additions & 0 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Deploy Release

env:
main_project_module: app

on:
workflow_dispatch:
inputs:
github_release:
description: 'enable github release'
required: true
type: boolean
google_play_release:
description: 'enable google play release'
required: true
type: boolean
release_tag_name:
description: 'tag'
required: true
type: string
is_patch:
description: 'Is the new version a patch'
required: true
type: boolean
default: false

jobs:
Build-Apk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set repository name as env variable
run: echo "repository_name=$(echo '${{ github.repository }}' | awk -F '/' '{print $2}')" >> $GITHUB_ENV
- name: Read version name from file
working-directory: ./gradle
id: read-version
run: echo "::set-output name=vName::$(grep 'vName' libs.versions.toml | awk -F' = ' '{print $2}' | tr -d '"')"
- name: Set Up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'
cache: 'gradle'
- name: Change wrapper permissions
run: chmod +x ./gradlew
- name: Decode Keystore
id: decode_keystore
uses: timheuer/base64-to-file@v1
with:
fileName: 'dhis_keystore.jks'
encodedString: ${{ secrets.KEYSTORE }}
- name: Build release apk
run: ./gradlew app:assembleRelease app:assembleDhisDebug
env:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SIGNING_KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
SIGNING_KEYSTORE_PATH: ${{ steps.decode_keystore.outputs.filePath }}

- name: Upload to Play Store
if: ${{ inputs.google_play_release }}
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: com.dhis2
releaseFiles: ${{ env.main_project_module }}/build/outputs/apk/dhisPlayServices/release/dhis2-v${{ steps.read-version.outputs.vName }}-googlePlay.apk
track: alpha
whatsNewDirectory: whatsnew


- name: Github Patch Release
if: ${{ (inputs.github_release == true) && (inputs.is_patch == true) }}
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: true
generateReleaseNotes: true
name: "Android Capture App for DHIS 2 (v${{ inputs.release_tag_name }}) - Patch version"
tag: ${{ inputs.release_tag_name }}
artifacts: ${{ env.main_project_module }}/build/outputs/apk/dhis/release/dhis2-v${{ steps.read-version.outputs.vName }}.apk,${{ env.main_project_module }}/build/outputs/apk/dhisPlayServices/release/dhis2-v${{ steps.read-version.outputs.vName }}-googlePlay.apk,${{ env.main_project_module }}/build/outputs/apk/dhis/debug/dhis2-v${{ steps.read-version.outputs.vName }}-training.apk

- name: Github New Release
if: ${{ (inputs.github_release == true) && (inputs.is_patch == false) }}
uses: ncipollo/release-action@v1
with:
allowUpdates: true
draft: true
bodyFile: "RELEASE.md"
name: "Android Capture App for DHIS 2 (v${{ inputs.release_tag_name }})"
tag: ${{ inputs.release_tag_name }}
artifacts: ${{ env.main_project_module }}/build/outputs/apk/dhis/release/dhis2-v${{ steps.read-version.outputs.vName }}.apk,${{ env.main_project_module }}/build/outputs/apk/dhisPlayServices/release/dhis2-v${{ steps.read-version.outputs.vName }}-googlePlay.apk,${{ env.main_project_module }}/build/outputs/apk/dhis/debug/dhis2-v${{ steps.read-version.outputs.vName }}-training.apk
13 changes: 13 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,16 @@ source_lang = en
type = ANDROID
minimum_perc = 0

[o:hisp-uio:p:dhis2-android-capture-app:r:ui-strings-xml]
file_filter = ui-components/src/main/res/values-<lang>/strings.xml
source_file = ui-components/src/main/res/values/strings.xml
source_lang = en
type = ANDROID
minimum_perc = 0

[o:hisp-uio:p:dhis2-android-capture-app:r:table-strings-xml]
file_filter = compose-table/src/main/res/values-<lang>/strings.xml
source_file = compose-table/src/main/res/values/strings.xml
source_lang = en
type = ANDROID
minimum_perc = 0
72 changes: 6 additions & 66 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,9 @@
Android Capture App for DHIS 2 (v2.9.1) - Patch version
<table>
<tr>
<td>
<img src="https://s3-eu-west-1.amazonaws.com/content.dhis2.org/dhis2-android/android-chrome-384x384.png" width="800">
</td>
<td>
This is a patch version of the <strong>DHIS2 Android App</strong> It builds upon the last version including bug fixes that couldn't wait to the next version.
It includes no functional improvements neither changes in the User Interface. It means that yours users can update without experiencing any change in the UI.
</td>
</tr>
<tr>
<td colspan="2" bgcolor="white">
# Release notes - Android App for DHIS2 - 3.0.0.1

## Bugs fixed
* [ANDROAPP-5895](https://dhis2.atlassian.net/browse/ANDROAPP-5895) Correct misalignment when entering text for inputShell
* [ANDROAPP-5885](https://dhis2.atlassian.net/browse/ANDROAPP-5885) [Data set] indicators don't update until the user moves to a different cell
* [ANDROAPP-5881](https://dhis2.atlassian.net/browse/ANDROAPP-5881) Input with virtual keyboard not working correctly
* [ANDROAPP-5872](https://dhis2.atlassian.net/browse/ANDROAPP-5872) [LMIS] Search in stock management is not updating the list
* [ANDROAPP-5871](https://dhis2.atlassian.net/browse/ANDROAPP-5871) App Not Responding when local db is encrypted
* [ANDROAPP-5856](https://dhis2.atlassian.net/browse/ANDROAPP-5856) ANR ReadableStoreImpl.addObjectsToCollection in DataSetDetailRepositoryImpl
* [ANDROAPP-5825](https://dhis2.atlassian.net/browse/ANDROAPP-5825) Input date value changes on click in schedule new event screen
* [ANDROAPP-5821](https://dhis2.atlassian.net/browse/ANDROAPP-5821) NoSuchElementException: List is empty.
* [ANDROAPP-5807](https://dhis2.atlassian.net/browse/ANDROAPP-5807) Crash when parsing value to input in InputDateTime
* [ANDROAPP-5804](https://dhis2.atlassian.net/browse/ANDROAPP-5804) Incorrect label on bar codes, QR codes and GS1
* [ANDROAPP-5803](https://dhis2.atlassian.net/browse/ANDROAPP-5803) On schedule event due date incorrect when last previous event does not have a report date
* [ANDROAPP-5788](https://dhis2.atlassian.net/browse/ANDROAPP-5788) Keyboard hides helper text if the selected field is near the bottom of the screen
* [ANDROAPP-5773](https://dhis2.atlassian.net/browse/ANDROAPP-5773) Analytics are not being displayed as tables.
* [ANDROAPP-5770](https://dhis2.atlassian.net/browse/ANDROAPP-5770) IllegalStateException: Expected BringIntoViewRequester to not be used before parents are placed.
* [ANDROAPP-5769](https://dhis2.atlassian.net/browse/ANDROAPP-5769) ApplicationNotResponding: ANR for at least 5000 ms.
* [ANDROAPP-5767](https://dhis2.atlassian.net/browse/ANDROAPP-5767) RuntimeException in teidashboardActivity Sentry issue
* [ANDROAPP-5764](https://dhis2.atlassian.net/browse/ANDROAPP-5764) BottomSheetDialog shows barcode expanded with old form
* [ANDROAPP-5749](https://dhis2.atlassian.net/browse/ANDROAPP-5749) Incorrect behavior when tapping on Next on sections that are too long
* [ANDROAPP-5746](https://dhis2.atlassian.net/browse/ANDROAPP-5746) Exception when trying to add a file from downloads directory
* [ANDROAPP-5743](https://dhis2.atlassian.net/browse/ANDROAPP-5743) [Bug?] Calculated variables save integer values with ".0"
* [ANDROAPP-5742](https://dhis2.atlassian.net/browse/ANDROAPP-5742) [Local Analytics] App isn't plotting all the points (per event), only the first one.
* [ANDROAPP-5741](https://dhis2.atlassian.net/browse/ANDROAPP-5741) [Local Analytics] App crashes if charts are empty
* [ANDROAPP-5740](https://dhis2.atlassian.net/browse/ANDROAPP-5740) Display error correctly when date or time is incomplete
* [ANDROAPP-5726](https://dhis2.atlassian.net/browse/ANDROAPP-5726) RTS workflow needs to allow for translating the 3 transaction types
* [ANDROAPP-5716](https://dhis2.atlassian.net/browse/ANDROAPP-5716) Filters not responsive to rapid changes when there are many programs
* [ANDROAPP-5710](https://dhis2.atlassian.net/browse/ANDROAPP-5710) Keyboard not showing for certain fields
* [ANDROAPP-5704](https://dhis2.atlassian.net/browse/ANDROAPP-5704) Overdue date in patient line list follows inconsistent format
* [ANDROAPP-5700](https://dhis2.atlassian.net/browse/ANDROAPP-5700) User can select out-of-scope OUs on the enrollment form
* [ANDROAPP-5698](https://dhis2.atlassian.net/browse/ANDROAPP-5698) Incorrect list of points in a polygon
* [ANDROAPP-5663](https://dhis2.atlassian.net/browse/ANDROAPP-5663) Tei dashboard event list scrolling
* [ANDROAPP-5662](https://dhis2.atlassian.net/browse/ANDROAPP-5662) Search button is behind the nav bar
* [ANDROAPP-5630](https://dhis2.atlassian.net/browse/ANDROAPP-5630) Due date in Tracker program does not follow standard interval days
* [ANDROAPP-5606](https://dhis2.atlassian.net/browse/ANDROAPP-5606) Active filter counter mismatched with workinglist's filters
* [ANDROAPP-5604](https://dhis2.atlassian.net/browse/ANDROAPP-5604) App crashes when one attempts to synchronise TEI and events imported via QR code
* [ANDROAPP-5570](https://dhis2.atlassian.net/browse/ANDROAPP-5570) Changes to enrollment date not respected by program rules
* [ANDROAPP-5567](https://dhis2.atlassian.net/browse/ANDROAPP-5567) DHIS2-RTS Capture app limited to 60 TEIs
* [ANDROAPP-5484](https://dhis2.atlassian.net/browse/ANDROAPP-5484) Images block creating relationships (Capture Android)
* [ANDROAPP-5294](https://dhis2.atlassian.net/browse/ANDROAPP-5294) Filter by ACCESSIBLE org units
* [ANDROAPP-5261](https://dhis2.atlassian.net/browse/ANDROAPP-5261) The animation of the input bottom bar is not smooth.
* [ANDROAPP-5249](https://dhis2.atlassian.net/browse/ANDROAPP-5249) Resizing for all columns difficult use
* [ANDROAPP-5130](https://dhis2.atlassian.net/browse/ANDROAPP-5130) Follow-up clicks can be skipped by the app when entering data into tables.
* This patch release updates the [Android SDK](https://github.com/dhis2/dhis2-android-sdk) to version 1.9.1-20240109.100903-15.

You can find in Jira details on the [bugs fixed](https://dhis2.atlassian.net/issues/?filter=10554) in this version.
### Bug

Remember to check the [documentation](https://www.dhis2.org/android-documentation) for detailed
information of the features included in the App and how to configure DHIS2 to use it.
[ANDROAPP-6194](https://dhis2.atlassian.net/browse/ANDROAPP-6194) Unable to search outside the program

Please create a [Jira](https://dhis2.atlassian.net) Issue if you find a bug or
you want to propose a new functionality. [Project: Android App for DHIS2 | Component:
AndroidApp].
</td>
</tr>
</table>
[ANDROAPP-6195](https://dhis2.atlassian.net/browse/ANDROAPP-6195) Missing terms in transifex

[ANDROAPP-6210](https://dhis2.atlassian.net/browse/ANDROAPP-6210) UninitializedPropertyAccessException on breaking the glass
25 changes: 23 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import com.android.build.api.variant.impl.VariantOutputImpl
import com.android.build.gradle.internal.scope.ProjectInfo.Companion.getBaseName
import java.io.ByteArrayOutputStream
import java.text.SimpleDateFormat
import java.util.Date
Expand Down Expand Up @@ -36,10 +38,10 @@ android {
}

signingConfigs {
create("release"){
create("release") {
keyAlias = System.getenv("SIGNING_KEY_ALIAS")
keyPassword = System.getenv("SIGNING_KEY_PASSWORD")
System.getenv("SIGNING_KEYSTORE_PATH")?.let {path->
System.getenv("SIGNING_KEYSTORE_PATH")?.let { path ->
storeFile = file(path)
}
storePassword = System.getenv("SIGNING_STORE_PASSWORD")
Expand Down Expand Up @@ -227,6 +229,25 @@ android {
abortOnError = false
checkReleaseBuilds = false
}

androidComponents {
onVariants { variant ->
val buildType = variant.buildType
val flavorName = variant.flavorName
variant.outputs.forEach { output ->
if (output is VariantOutputImpl) {
val suffix = when {
buildType == "debug" && flavorName == "dhis" -> "-training"
buildType == "release" && flavorName == "dhisPlayServices" -> "-googlePlay"
else -> ""
}

output.outputFileName = "dhis2-v${libs.versions.vName.get()}$suffix.apk"
}
}

}
}
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,11 @@ class MockWebServerRobot(private val dhis2MockServer: Dhis2MockServer) {
fun addResponse(method: String, path: String, sdkResource: String, responseCode: Int = 200) {
dhis2MockServer.addResponse(method, path, sdkResource, responseCode)
}

companion object {
const val API_OLD_TRACKED_ENTITY_PATH = "/api/trackedEntityInstances/query?.*"
const val API_OLD_TRACKED_ENTITY_RESPONSE =
"mocks/teilist/old_tracked_entity_empty_response.json"

}
}
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
Expand Up @@ -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)
}

Expand All @@ -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
Expand Up @@ -7,11 +7,14 @@ import androidx.compose.ui.text.intl.Locale
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.rule.ActivityTestRule
import org.dhis2.R
import org.dhis2.common.mockwebserver.MockWebServerRobot.Companion.API_OLD_TRACKED_ENTITY_PATH
import org.dhis2.common.mockwebserver.MockWebServerRobot.Companion.API_OLD_TRACKED_ENTITY_RESPONSE
import org.dhis2.usescases.BaseTest
import org.dhis2.usescases.flow.teiFlow.entity.DateRegistrationUIModel
import org.dhis2.usescases.flow.teiFlow.entity.RegisterTEIUIModel
import org.dhis2.usescases.flow.teiFlow.teiFlowRobot
import org.dhis2.usescases.searchTrackEntity.SearchTEActivity
import org.hisp.dhis.android.core.mockwebserver.ResponseController
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
Expand All @@ -28,8 +31,19 @@ class SearchFlowTest : BaseTest() {
private val dateRegistration = createFirstSpecificDate()
private val dateEnrollment = createEnrollmentDate()

override fun setUp() {
super.setUp()
setupMockServer()
}

@Test
fun shouldCreateTEIAndFilterByEnrollment() {
mockWebServerRobot.addResponse(
ResponseController.GET,
API_OLD_TRACKED_ENTITY_PATH,
API_OLD_TRACKED_ENTITY_RESPONSE,
)

setDatePicker()
val registerTEIDetails = createRegisterTEI()
val enrollmentStatus = context.getString(R.string.filters_title_enrollment_status)
Expand Down
Loading

0 comments on commit b9a9065

Please sign in to comment.