MS-479 age group selection screen#749
Conversation
# Conflicts: # feature/orchestrator/build.gradle.kts # feature/orchestrator/src/main/java/com/simprints/feature/orchestrator/steps/StepId.kt # feature/orchestrator/src/main/java/com/simprints/feature/orchestrator/usecases/steps/BuildStepsUseCase.kt # infra/resources/src/main/res/values/strings.xml # settings.gradle.kts
afe58b0 to
30a4a7e
Compare
30a4a7e to
f6937bd
Compare
| @@ -5,7 +5,7 @@ import com.simprints.infra.config.store.models.TokenKeyType | |||
| import io.mockk.mockk | |||
| import org.junit.Test | |||
|
|
|||
| class ApiGuidSelectionPayloadTest { | |||
There was a problem hiding this comment.
Hm, is it intentional that you've renamed the ApiGuidSelectionPayloadTest?
| private fun formatAgeInMonthsForDisplay(ageInMonths: Int): String { | ||
| return when { | ||
| ageInMonths < 12 -> "$ageInMonths ${getString(IDR.age_group_selection_months)}" | ||
| ageInMonths < 24 -> "1 ${getString(IDR.age_group_selection_year)}" |
There was a problem hiding this comment.
Shouldn't it also display the months? Otherwise there would be no difference between 13-23 months and there might be an SDK that works only from say 15 months.
42baee0 to
ca12fa8
Compare
| * Dev version >= 2023.4.0 is required for receiving new fingerprint configurations [CORE-3033] | ||
| * Dev version >= 2024.2.1 is required for receiving biometric sdk age restrictions | ||
| */ | ||
| set("VERSION_NAME", "2024.1.1") |
There was a problem hiding this comment.
You wrote that the dev version should be >= 2024.2.1, but you set 2024.1.1 you will not get the age configuration
| fun ProjectConfiguration.allowedAgeRanges(): List<AgeGroup> { | ||
| return listOf( | ||
| //Todo add face roc sdk , | ||
| fingerprint?.secugenSimMatcher?.allowedAgeRange, | ||
| fingerprint?.nec?.allowedAgeRange | ||
| ).mapNotNull { it } | ||
| } |
There was a problem hiding this comment.
If you look at the API definition the allowedAgeRange field is always present, but it's empty when both start and end are equal to null
|
|
||
| @Keep | ||
| internal data class ApiAgeGroup( | ||
| val startInclusive: Int, |
There was a problem hiding this comment.
startInclusive is not mandatory, so it should be a nullable int
|
|
||
| private fun generateSortedUniqueAgeGroups(ageGroups: List<AgeGroup>): List<AgeGroup> { | ||
| // Handle empty list case by returning a single age group starting at 0 and ending with null | ||
| if (ageGroups.isEmpty()) return listOf(AgeGroup(0, null)) |
There was a problem hiding this comment.
This should not happen as you are only displaying the age selection if there are some age groups no?
luhmirin-s
left a comment
There was a problem hiding this comment.
The lack of plurals in the range name creation is the dealbreaker for me.
| fillRecyclerView(ageGroupsList) | ||
| } | ||
|
|
||
| viewModel.showExitForm.observe(viewLifecycleOwner) { exitFormConfig -> |
There was a problem hiding this comment.
Could be using the custom observer instance to avoid checking "ifNotHandled" manually.
There was a problem hiding this comment.
I just copied the code from the consent fragment
There was a problem hiding this comment.
Then consent fragment could also be improved :)
4a428b8 to
481c6aa
Compare
481c6aa to
501deb7
Compare
…d-sdk-selection # Conflicts: # infra/events/src/main/java/com/simprints/infra/events/event/domain/models/EventPayload.kt
501deb7 to
266b985
Compare
|
| @Test | ||
| fun `should map correctly the allowedAgeRange`() { | ||
| val mapping = mapOf( | ||
| ProtoFingerprintConfiguration.VeroGeneration.VERO_1 to FingerprintConfiguration.VeroGeneration.VERO_1, |
There was a problem hiding this comment.
Looks like this is not testing what it should.
There was a problem hiding this comment.
Should this test be a new file instead of renaming ApiGuidSelectionPayloadTest?



Uh oh!
There was an error while loading. Please reload this page.