-
Notifications
You must be signed in to change notification settings - Fork 71
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
Update to ODK Collect v2024.2.4 release #13
Conversation
Update command used to install local JavaRosa
Allow MBTile files to be imported
Code improvements for media file downloading
Guard against incorrect paths
Update JavaRosa to 4.4.1 for CSV parse improvements
Add analytics for INSTANCE_UPLOAD
Don't allow inserting instances with custom submission URI
Add message to PathUtils exception
Support symlink `dirPath` in `getAbsoluteFilePath`
…eption Log error instead of throwing security exception
remove spurious lock file inadvertently added during mondo commit
Remove node_modules from repo. Inadvertently added during mondo commit from local clone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed all changes.
Observed a few minor legacy ODK Collect inconsistencies:
- in build.gradle
tasks.register('testLab') {
dependsOn "collect_app:assembleDebug", "collect_app:assembleDebugAndroidTest"
doLast {
exec {
executable 'gcloud'
args('beta', 'firebase', 'test', 'android', 'run',
'--type', 'instrumentation',
'--num-uniform-shards=25',
'--app', 'collect_app/build/outputs/apk/debug/ODK-Collect-debug.apk',
'--test', 'collect_app/build/outputs/apk/androidTest/debug/ODK-Collect-debug-androidTest.apk',
'--device', 'model=MediumPhone.arm,version=34,locale=en,orientation=portrait',
'--timeout', '10m',
'--directories-to-pull', '/sdcard',
'--test-targets', "notPackage org.odk.collect.android.regression"
)
}
}
}
We are not presently using this task or firebase for automated testing. But this gradle task definition will need to be changed if/when we do.
- in collect_app/src/androidTest/java/org/odk/collect/android/feature/external/InstanceUploadActionTest.kt
val intent = Intent("org.odk.collect.android.INSTANCE_UPLOAD")
This new testcase seems to have an intent identifier that explicitly refers to the 'org.odk.collect.android' application identifier. This may need to be changed to 'org.koboc.collect.android'. Consider adding this file to kobo-string-replace.js
Should have no impact as testcase only.
- in collect_app/src/androidTest/java/org/odk/collect/android/support/rules/RecentAppsRule.kt
fun leaveAndKillApp() {
...
device.wait(Until.hasObject(By.descContains("Collect")), TimeInMs.ONE_SECOND)
device.findObject(UiSelector().descriptionContains("Collect"))
This testcase appears to drop out into Android home screen (?) and then searches for the app again, looking for any apps with 'Collect' in their name (?). If so this seems rather brittle... but given we're renaming the app to "KoboCollect" its probably ok.
Should have no impact as testcase only.
- usages of GetODK's "@drawable/notes" icon
in collect_app/src/main/res/layout/annotate_widget.xml:
tools:src="@drawable/notes"/>
in collect_app/src/main/res/layout/draw_widget.xml
tools:src="@drawable/notes"/>
in collect_app/src/main/res/layout/image_widget.xml
tools:src="@drawable/notes"/>
collect_app/src/main/res/layout/signature_widget.xml
tools:src="@drawable/notes"/>
But previous KoboCollect has replaced GetODKs icon with a Kobo logo, so these usages should be ok. However, ideally it should be possible to remove this GetODK-specifc icon entirely (to avoid all doubt), so consider fixing these and perhaps adding references to this icon to kobo-string-replace.js
- in collect_app/src/test/java/org/odk/collect/android/activities/FormFillingActivityTest.kt
withText("This form no longer exists, please email [email protected] with a description of what you were doing when this happened."),
This new testcase appears probably wasnt picked up by existing string replacement. Need to add reference to this new file in kobo-string-replace.js May result in a failing automated test in the mean time.
Should have no impact as testcase only.
- in maps/src/main/java/org/odk/collect/maps/layers/OfflineMapLayersPicker.kt
Uri.parse("https://docs.getodk.org/collect-offline-maps/#transferring-offline-tilesets-to-devices")
This appears to make a call out to GetODK documentation website for specific instructions for how to add offline map tiles. We may want to onsider having a Kobo webpage with equivalent instructions.
Should have no impact other than directing Kobo users to GetODK website for help on this specific topic.
- in strings/src/main/res/values/strings.xml
<string name="savepoint_recovery_dialog_message">\'Collect closed unexpectedly on \'EEE, MMM dd, yyyy \'at\' HH:mm\' and saved your work.\n\nWould you like to recover or discard it?\'</string>
There are a bunch of places in displayed strings where the term 'Collect' is used in the context of a direct reference to the ODK Collect as per se. These all probably have not been covered or detected by the existing kobo-string-replace.js script (which looks for 'ODK Collect' string substitutions...). May want to carefully go thru all these and consider add a new substitution into this script to change such contextual occurences of 'Collect' to 'KoboCollect'
Should have no serious branding impact since these dont explicitly mention 'ODK' and KoboCollect users may just consider them to be an abbreviation of 'KoboCollect' instead.
Closes #
Why is this the best possible solution? Were any other approaches considered?
Updates KoboCollect to latest changes contained in ODK Collect v2024.2.4, plus requisiite Kobo rebranding (reapplied as needed)
How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
Have run base ODK unit and UI tests, after applying Kobo rebranding changes. Baseline tests behave the same as pristine ODK Collect v2024.2.4 (notwithstanding all identified test that now fail due to rebranding not being applied to the testcase asserts; but the core functionality is correct)
Do we need any specific form for testing your changes? If so, please attach one.
no Kobo-specific test forms required; base KoboCollect functionality remains same as ODK Collect.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
TDB if any of the new functionality expsoed by ODK Collect needs to be specifically called out in KoboToolbox doc. But probably we want to update Kobo docs with the new features added in ODK Collect v2024.2.4
Before submitting this PR, please make sure you have:
./gradlew connectedAndroidTest
(or./gradlew testLab
) and confirmed all checks still pass: I have run both the unit test and UI test suites under Android Studio, against several flavors of emulators and physical devices. Not unexpected failures