MOSIP-44541:Automated the test cases of consentscreen#1672
MOSIP-44541:Automated the test cases of consentscreen#1672rohithgoudbuyyani wants to merge 7 commits intomosip:developfrom
Conversation
Signed-off-by: Rohith Goud <buyyanirohithgoud@gmail.com>
Signed-off-by: Rohith Goud <buyyanirohithgoud@gmail.com>
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds three UI element fields and four visibility-check methods to ConsentPage, four new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ui-test/src/main/java/stepdefinitions/ConsentStepDefinition.java`:
- Around line 333-336: The step text and assertion disagree: the step method
verifyTheEssentialClaimsList calls consentPage.isEssentialClaimsListDisplayed()
but the Gherkin step says "voluntary claims"; pick one and make them consistent
— either rename the Java method to verifyTheVoluntaryClaimsList and call
consentPage.isVoluntaryClaimsListDisplayed(), or change the Gherkin step text in
ConsentPage.feature to "verify list of essential claims are present" so it
matches verifyTheEssentialClaimsList and
consentPage.isEssentialClaimsListDisplayed(); update the corresponding glue
mapping so the feature and step definition remain aligned.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 5c2d4eca-264d-4bdb-9d8b-2697d3a41a47
📒 Files selected for processing (3)
ui-test/src/main/java/pages/ConsentPage.javaui-test/src/main/java/stepdefinitions/ConsentStepDefinition.javaui-test/src/main/resources/featurefiles/ConsentPage.feature
ui-test/src/main/java/stepdefinitions/ConsentStepDefinition.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Rohith Goud <buyyanirohithgoud@gmail.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ui-test/src/main/resources/featurefiles/ConsentPage.feature`:
- Around line 73-99: Add an explicit assertion that voluntary claims are absent
by extending the feature with a step like "And user verify voluntary claims are
not present" and implement its step definition to call a page-check method
(e.g., consentPage.areVoluntaryClaimsPresent()) and assert false (e.g.,
assertFalse or equivalent). Add or update the ConsentPage object with an
areVoluntaryClaimsPresent() method that inspects the consent DOM for
voluntary-claim elements (class/id/selector used elsewhere) and returns a
boolean so the step definition can fail the scenario when voluntary claims are
present.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 277e6ccc-802a-43ab-8d6e-6b478988cdb5
📒 Files selected for processing (2)
ui-test/src/main/java/stepdefinitions/ConsentStepDefinition.javaui-test/src/main/resources/featurefiles/ConsentPage.feature
Signed-off-by: Rohith Goud <buyyanirohithgoud@gmail.com>
Signed-off-by: Rohith Goud <buyyanirohithgoud@gmail.com>
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
ui-test/src/main/resources/featurefiles/ConsentPage.feature (1)
73-98:⚠️ Potential issue | 🟠 MajorScenario title still overstates what this flow validates.
The assertions on Line 94 through Line 98 only check the essential-claims header/list, action message, and timer. Nothing here fails if voluntary claims are still rendered, so the
unavailable voluntary claimsbehavior remains untested. Please either add an explicit negative step for voluntary claims or rename the scenario to match the current coverage.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ui-test/src/main/resources/featurefiles/ConsentPage.feature` around lines 73 - 98, The Scenario Outline titled "Verifying Consent Screen changes to handle unavailable voluntary claims" overstates coverage because the existing assertions (the steps that verify essential-claims header/list, action message, and timer) do not assert voluntary claims are absent; either add an explicit negative check such as a step (e.g., "And user verify voluntary claims are not displayed" or "And verify voluntary claims are not present on consent screen") placed after the existing consent verifications, or rename the Scenario Outline title to accurately reflect the checks performed (e.g., remove the "unavailable voluntary claims" phrase); ensure references to the Scenario Outline title and the steps that verify essential-claims header/list, action message, and timer are updated accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ui-test/src/main/java/stepdefinitions/ConsentStepDefinition.java`:
- Around line 333-336: The current verifyTheEssentialClaimsList method only
checks visibility via consentPage.isEssentialClaimsListDisplayed(), which can
pass for an empty container; update verifyTheEssentialClaimsList to assert
actual items: call the page object method that returns claim items (e.g.,
consentPage.getEssentialClaims() or consentPage.getEssentialClaimCount()) and
assert count > 0, or reuse an existing stronger check such as
consentPage.isEssentialClaimPresent(<expectedClaim>) to verify at least one real
claim is rendered instead of only the container visibility.
---
Duplicate comments:
In `@ui-test/src/main/resources/featurefiles/ConsentPage.feature`:
- Around line 73-98: The Scenario Outline titled "Verifying Consent Screen
changes to handle unavailable voluntary claims" overstates coverage because the
existing assertions (the steps that verify essential-claims header/list, action
message, and timer) do not assert voluntary claims are absent; either add an
explicit negative check such as a step (e.g., "And user verify voluntary claims
are not displayed" or "And verify voluntary claims are not present on consent
screen") placed after the existing consent verifications, or rename the Scenario
Outline title to accurately reflect the checks performed (e.g., remove the
"unavailable voluntary claims" phrase); ensure references to the Scenario
Outline title and the steps that verify essential-claims header/list, action
message, and timer are updated accordingly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 157ee022-59ac-45f6-9f85-b5f90b26b10c
📒 Files selected for processing (2)
ui-test/src/main/java/stepdefinitions/ConsentStepDefinition.javaui-test/src/main/resources/featurefiles/ConsentPage.feature
Signed-off-by: Rohith Goud <buyyanirohithgoud@gmail.com>
ui-test/src/main/java/stepdefinitions/ConsentStepDefinition.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Rohith Goud <buyyanirohithgoud@gmail.com>
| When Click on Language selection option | ||
| And Select the mandatory language | ||
| And user click on Login with Otp |
There was a problem hiding this comment.
Still i can see inconsistency in camelcase
Automated the 4 test cases of consentscreen
Summary by CodeRabbit