MOSIP-45237-Reg-client Automate Biometric exception page flow (20 test cases)#819
MOSIP-45237-Reg-client Automate Biometric exception page flow (20 test cases)#819jayesh12234 wants to merge 23 commits into
Conversation
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
Signed-off-by: Jayesh Kharode <jayesh.kharode@technoforte.co.in>
WalkthroughThe PR adds POE skip/upload-delete handling in demographic and document upload flows, new retained-biometric verification in biometric upload, and updated repository fixtures for affected identities. ChangesPOE and biometric retention flow
Sequence Diagram(s)sequenceDiagram
participant DemographicPage
participant DocumentUploadPage
participant BiometricUploadPage
alt skip POE
DemographicPage->>DemographicPage: set skipDocumentUpload
else upload then delete POE
DemographicPage->>DocumentUploadPage: uploadPoeDocument(jsonIdentity)
DemographicPage->>DocumentUploadPage: deletePoeDocument()
end
DemographicPage->>BiometricUploadPage: verifyCapturedBiometricsRetained(identity)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
registration/registration-test/src/main/java/registrationtest/pages/BiometricUploadPage.java (1)
181-204: 🩺 Stability & Availability | 🟠 MajorReplace the blocking
Thread.sleep(500)with an explicit wait.The fixed delay after
clickModalityintroduces flakiness by relying on an arbitrary duration rather than actual UI state readiness. SinceWaitForAsyncUtils.waitForFxEvents()only flushes the JavaFX event queue and does not guarantee UI rendering, the subsequent logic is susceptible to race conditions.Replace the sleep with a targeted wait for the specific controls to appear using the project's standard
waitsUtil. This aligns with repository guidelines to avoid fixed sleeps in test harnesses.Consider replacing:
Thread.sleep(500);With:
waitsUtil.waitForNode("`#rightIndex`");(Or a common parent node if
rightIndexis not guaranteed to be present in all exception scenarios).🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@registration/registration-test/src/main/java/registrationtest/pages/BiometricUploadPage.java` around lines 181 - 204, The biometric upload flow in BiometricUploadPage relies on a fixed Thread.sleep(500) before checking for finger nodes, which can cause flaky tests. Replace that sleep with an explicit wait using the existing waitsUtil in the same method so the code waits for the relevant UI control(s) to be present or visible before calling clickNodeAssert on `#rightIndex`, `#rightLittle`, `#rightRing`, and `#rightMiddle`. If `#rightIndex` is not always available, wait on a stable parent or another shared node in this branch, then keep the existing conditional click logic and WaitForAsyncUtils.waitForFxEvents call afterward.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@registration/registration-test/src/main/java/registrationtest/pages/DemographicPage.java`:
- Around line 287-295: The POE skip/delete branch in DemographicPage should be
moved ahead of the BiometricDetails field-processing path so the new flag is
applied before contolType(...)->fileupload(...) runs. Update the
BiometricDetails handling in DemographicPage to call
skipPoeOnBiometricScreen(...) and uploadAndDeletePoeOnBiometricScreen(...)
before any POE upload work, then keep the existing verifyBioAfterSkipPOE and
verifyPoeDeleteFlow checks tied to the same JsonIdentity keys.
In
`@registration/registration-test/src/main/java/registrationtest/pages/DocumentUploadPage.java`:
- Around line 124-128: The POE selection flow in DocumentUploadPage currently
falls back to the first combo item via user_selects_combo_itemdoc(...), which
can hide a bad proofOfException value; update the helper around
JsonUtil.JsonObjSimpleParsing, user_selects_combo_itemdoc, and the scan button
click to verify the configured POE option exists in the dropdown before
proceeding, and fail/assert immediately if the requested value is missing
instead of scanning an arbitrary document.
---
Outside diff comments:
In
`@registration/registration-test/src/main/java/registrationtest/pages/BiometricUploadPage.java`:
- Around line 181-204: The biometric upload flow in BiometricUploadPage relies
on a fixed Thread.sleep(500) before checking for finger nodes, which can cause
flaky tests. Replace that sleep with an explicit wait using the existing
waitsUtil in the same method so the code waits for the relevant UI control(s) to
be present or visible before calling clickNodeAssert on `#rightIndex`,
`#rightLittle`, `#rightRing`, and `#rightMiddle`. If `#rightIndex` is not always
available, wait on a stable parent or another shared node in this branch, then
keep the existing conditional click logic and WaitForAsyncUtils.waitForFxEvents
call afterward.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 7fe19c42-11b0-4385-ab0e-8a9edf5aee1d
📒 Files selected for processing (12)
registration/registration-test/src/main/java/registrationtest/pages/BiometricUploadPage.javaregistration/registration-test/src/main/java/registrationtest/pages/DemographicPage.javaregistration/registration-test/src/main/java/registrationtest/pages/DocumentUploadPage.javaregistration/registration-test/src/main/resources/repository_eng/LostAdultExceptionLeftEye.jsonregistration/registration-test/src/main/resources/repository_eng/LostAdultExceptionRighthand.jsonregistration/registration-test/src/main/resources/repository_eng/LostChildMinorExceptionRightHand.jsonregistration/registration-test/src/main/resources/repository_eng/NewAdultExceptionLeftEye.jsonregistration/registration-test/src/main/resources/repository_eng/NewAdultExceptionLefthand.jsonregistration/registration-test/src/main/resources/repository_eng/NewChildInfantExceptionEyeParent.jsonregistration/registration-test/src/main/resources/repository_eng/NewChildMinorExceptionLeftHand.jsonregistration/registration-test/src/main/resources/repository_eng/UpdateAdultBioExceptionEye.jsonregistration/registration-test/src/main/resources/repository_eng/UpdateAdultBioExceptionLeftHand.json
|
@jayesh12234 @mohanachandran-s - Bio field id is hardcoded based on our default UI schema. I also same approach for screen names. How can we use this automation with a slightly different UI spec, with different screen names? |
Summary by CodeRabbit
New Features
Bug Fixes