Skip to content

MOSIP-45237-Reg-client Automate Biometric exception page flow (20 test cases)#819

Open
jayesh12234 wants to merge 23 commits into
mosip:developfrom
jayesh12234:develop
Open

MOSIP-45237-Reg-client Automate Biometric exception page flow (20 test cases)#819
jayesh12234 wants to merge 23 commits into
mosip:developfrom
jayesh12234:develop

Conversation

@jayesh12234

@jayesh12234 jayesh12234 commented Jun 25, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • New Features

    • Added support for proof-of-exception and biometric-retention verification flows in registration testing.
    • Expanded test data for several exception and update scenarios to cover preview and acknowledgment checks.
  • Bug Fixes

    • Improved biometric selection timing to make verification flows more reliable.
    • Added checks that confirm biometric completion indicators remain visible after exception handling.

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>
@jayesh12234 jayesh12234 changed the title MOSIP-45237-Reg-client Automate Biometric exception page flow MOSIP-45237-Reg-client Automate Biometric exception page flow (20 test cases) Jun 25, 2026
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The 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.

Changes

POE and biometric retention flow

Layer / File(s) Summary
Document upload controls
registration/registration-test/src/main/java/registrationtest/pages/DemographicPage.java, registration/registration-test/src/main/java/registrationtest/pages/DocumentUploadPage.java
DemographicPage adds skipDocumentUpload and a fileupload(...) early return, and DocumentUploadPage adds POE upload/delete actions.
Biometric retention checks
registration/registration-test/src/main/java/registrationtest/pages/BiometricUploadPage.java
BiometricUploadPage adds verifyCapturedBiometricsRetained(String identity), scrolls the modality list, checks completion markers, and adds waits around fingerprint slab selection.
POE orchestration and fixtures
registration/registration-test/src/main/java/registrationtest/pages/DemographicPage.java, registration/registration-test/src/main/resources/repository_eng/*.json
DemographicPage adds POE skip/upload-delete branching, screen detection, BiometricDetails navigation, and a verification call; the JSON fixtures add previewTests, ackTests, and verifyBioAfterSkipPOE entries.

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)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • mohanachandran-s
  • anushasunkada

Poem

🐰 I hopped through POE with gentle care,
and found bright biometrics waiting there.
The scan lights blinked, the marks stayed true,
while JSON carrots lined the queue.
Hop-hop — the retention trail shines through!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.55% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: automating the biometric exception page flow and its related test cases.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 | 🟠 Major

Replace the blocking Thread.sleep(500) with an explicit wait.

The fixed delay after clickModality introduces flakiness by relying on an arbitrary duration rather than actual UI state readiness. Since WaitForAsyncUtils.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 rightIndex is 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

📥 Commits

Reviewing files that changed from the base of the PR and between 3954574 and b9e37c5.

📒 Files selected for processing (12)
  • registration/registration-test/src/main/java/registrationtest/pages/BiometricUploadPage.java
  • registration/registration-test/src/main/java/registrationtest/pages/DemographicPage.java
  • registration/registration-test/src/main/java/registrationtest/pages/DocumentUploadPage.java
  • registration/registration-test/src/main/resources/repository_eng/LostAdultExceptionLeftEye.json
  • registration/registration-test/src/main/resources/repository_eng/LostAdultExceptionRighthand.json
  • registration/registration-test/src/main/resources/repository_eng/LostChildMinorExceptionRightHand.json
  • registration/registration-test/src/main/resources/repository_eng/NewAdultExceptionLeftEye.json
  • registration/registration-test/src/main/resources/repository_eng/NewAdultExceptionLefthand.json
  • registration/registration-test/src/main/resources/repository_eng/NewChildInfantExceptionEyeParent.json
  • registration/registration-test/src/main/resources/repository_eng/NewChildMinorExceptionLeftHand.json
  • registration/registration-test/src/main/resources/repository_eng/UpdateAdultBioExceptionEye.json
  • registration/registration-test/src/main/resources/repository_eng/UpdateAdultBioExceptionLeftHand.json

@anushasunkada

anushasunkada commented Jul 1, 2026

Copy link
Copy Markdown

@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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants