Skip to content

ES-2748 - Updated description for eSignet test cases#1623

Open
prathmeshj12 wants to merge 2 commits intomosip:developfrom
prathmeshj12:develop
Open

ES-2748 - Updated description for eSignet test cases#1623
prathmeshj12 wants to merge 2 commits intomosip:developfrom
prathmeshj12:develop

Conversation

@prathmeshj12
Copy link
Contributor

@prathmeshj12 prathmeshj12 commented Jan 31, 2026

  1. Updated the csrf token method before condition.
  2. Updated description for eSignet test cases.

Summary by CodeRabbit

  • Tests

    • Expanded test coverage for Consent No Capture flow with new user information retrieval tests.
    • Enhanced test case descriptions for improved clarity on OAuth, authentication, and token generation workflows.
    • Added comprehensive test data templates for Consent No Capture scenarios.
  • Bug Fixes

    • Optimized token fetching in test runner to execute once at startup instead of multiple redundant calls.
  • Chores

    • Updated test data cleanup configurations to include partner entity deletion.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: Prathmesh Jadhav <prathmesh.j@cyberpwn.com>
Signed-off-by: Prathmesh Jadhav <prathmesh.j@cyberpwn.com>
@coderabbitai
Copy link

coderabbitai bot commented Jan 31, 2026

Walkthrough

Consolidates CSRF token fetching to a single early execution point in the test runner, adds database cleanup queries for policy_group and partner deletion, introduces a new UserInfo test workflow for the Consent No Capture flow, updates multiple test configuration descriptions for clarity, and migrates UserInfo test templates to a restructured directory.

Changes

Cohort / File(s) Summary
CSRF Token Consolidation
api-test/src/main/java/.../testrunner/MosipTestRunner.java
Moved AdminTestUtil.fetchAndStoreCsrfToken() call to a single early execution point and removed redundant calls from three downstream test runner branches.
Database Cleanup Configuration
api-test/src/main/resources/config/pmsDataDeleteQueries.txt
Added deletion statements for policy_group and partner tables with matching creator module identifier.
Test Description Updates
api-test/src/main/resources/esignet/OTPAuthFactorFlow/ConsentNoCapture/AuthCode.../*.yml, Authenticate.../*.yml, GenToken.../*.yml, OAuth.../*.yml
Updated test descriptions across four Consent No Capture test workflows to provide more specific validation details and flow context.
New UserInfo Test Workflow
api-test/src/main/resources/esignet/OTPAuthFactorFlow/ConsentNoCapture/UserInfoConsentNoCapture/UserInfoConsentNoCapture.yml, UserInfoConsentNoCapture.hbs, UserInfoConsentNoCaptureResult.hbs
Added new GET /v1/esignet/oidc/userinfo test workflow with Handlebars templates for validating user info retrieval with verified claims in Consent No Capture flow.
Existing UserInfo Test Migration
api-test/src/main/resources/esignet/OTPAuthFactorFlow/ConsentNoCapture/UserinfoConsentNoCapture/UserInfoConsentNoCapture.yml
Updated description and corrected input/output template paths to reference the relocated UserInfoConsentNoCapture directory structure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A token fetched once, not thrice—how neat!
Queries cleaned, workflows complete,
UserInfo tests now shine so bright,
Descriptions refined to get it right!
The rabbit hops through test refine,
Making the eSignet pipeline align!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ES-2748 - Updated description for eSignet test cases' directly matches the main changes in the pull request, which focus on updating test case descriptions across multiple YAML files and adding new test workflows.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In
`@api-test/src/main/resources/esignet/OTPAuthFactorFlow/ConsentNoCapture/UserinfoConsentNoCapture/UserInfoConsentNoCapture.yml`:
- Around line 10-11: This file duplicates templates in the old
"UserinfoConsentNoCapture" folder; either remove the outdated directory or move
this YAML into the PascalCase "UserInfoConsentNoCapture" directory and update
its inputTemplate/outputTemplate references to use the
"UserInfoConsentNoCapture/UserInfoConsentNoCapture" and
"UserInfoConsentNoCapture/UserInfoConsentNoCaptureResult" paths respectively so
only the PascalCase folder remains and no duplicate configurations exist.

In
`@api-test/src/main/resources/esignet/OTPAuthFactorFlow/ConsentNoCapture/UserInfoConsentNoCapture/UserInfoConsentNoCapture.yml`:
- Around line 1-15: Remove the misnamed duplicate directory
"UserinfoConsentNoCapture" (lowercase i) and its YAML/test files so only the
correctly named "UserInfoConsentNoCapture" remains; ensure the single remaining
test configuration retains the uniqueIdentifier
TC_ESignet_UserInfoConsentNoCapture_01 and continues to reference the
input/output templates at
esignet/OTPAuthFactorFlow/ConsentNoCapture/UserInfoConsentNoCapture/UserInfoConsentNoCapture
and ...UserInfoConsentNoCaptureResult to avoid duplicate registration/conflicts
during test discovery.

description: Validate user info retrieval with verified claims for Consent No Capture flow
role: resident
restMethod: get
checkErrorsOnlyInResponse: true
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead use checkStatusCodeOnlyInResponse

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.

2 participants