Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions ui-test/src/main/java/pages/ConsentPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,15 @@ public ConsentPage(WebDriver driver) {
@FindBy(xpath = "//button[contains(@class,'flex items-center px-4')]")
WebElement profileDropdown;

@FindBy(xpath = "(//div[@class='font-semibold'])[1]")
WebElement essentialClaimsHeader;

@FindBy(xpath = "(//div[@class='divide-y'])[1]")
WebElement essentialClaimsList;

@FindBy(xpath = "//p[@class='text-[#4E4E4E] font-semibold']")
WebElement actionMessage;

public void clickOnLoginWithOtp() {
clickOnElement(loginWithOtpButton, "Clicked on login with Otp button");
}
Expand Down Expand Up @@ -300,4 +309,20 @@ public List<String> getDisplayedClaims() {
return claims;
}

public boolean isEssentialClaimsHeaderDisplayed() {
return isElementVisible(essentialClaimsHeader, "Verified essential claims header is visible");
}

public boolean isEssentialClaimsListDisplayed() {
return isElementVisible(essentialClaimsList, "Verified essential claims list is visible");
}

public boolean isActionMessageDisplayed() {
return isElementVisible(actionMessage, "Verified action message is displayed");
}

public boolean isTimerDisplayed() {
return isElementVisible(consentTimer, "Verified timer is displayed");
}

}
23 changes: 23 additions & 0 deletions ui-test/src/main/java/stepdefinitions/ConsentStepDefinition.java
Original file line number Diff line number Diff line change
Expand Up @@ -328,4 +328,27 @@ public void verifyTimerPersistsAfterRefresh() {
Assert.assertTrue(afterRefresh <= beforeRefresh && (beforeRefresh - afterRefresh) <= 2,
"Timer should persist after refresh within 2 seconds tolerance");
}

@Then("user verify the header of essential claims")
public void verifyTheEssentialClaimsHeader() {
Assert.assertTrue(consentPage.isEssentialClaimsHeaderDisplayed(),
"The header of the essential is not displayed");
}

@Then("user verify the list of essential claims are present")
public void verifyTheEssentialClaimsList() {
Assert.assertTrue(consentPage.isEssentialClaimsListDisplayed(),
"No essential claims were rendered on the consent screen");
}
Comment thread
rohithgoudbuyyani marked this conversation as resolved.

@Then("user verify the action message in consent screen")
public void verifyTheActionMessage() {
Assert.assertTrue(consentPage.isActionMessageDisplayed(),
"The action message in the consent screen is not displayed");
}

@Then("user verify the timer is displayed in consent screen")
public void verifyTheTimerInConsentScreen() {
Assert.assertTrue(consentPage.isTimerDisplayed(), "The timer is not displayed in the consent screen");
}
}
35 changes: 33 additions & 2 deletions ui-test/src/main/resources/featurefiles/ConsentPage.feature
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Feature: Esignet Consent Page
And user fills the signup form using UI specification
And user clicks on Continue button in Setup Account Page
And verify that success screen is displayed

@smoke @ToggleButtonInConsentPage
Scenario Outline: Verifying Toggle button in consent screen
Given user captures the authorize url
Expand Down Expand Up @@ -68,4 +68,35 @@ Feature: Esignet Consent Page
Examples:
| correct Otp |
| 111111 |


@smoke @Consentscreen
Scenario Outline: Verifying Consent Screen changes to handle unavailable voluntary claims
Given user captures the authorize url
When Click on Language selection option
And Select the mandatory language
And user click on Login with Otp
Comment thread
rohithgoudbuyyani marked this conversation as resolved.
Then user enters Registered mobile number into the mobile number field
And user click on get otp button
When user enters the "<correct Otp>"
And click on verify Otp button
Comment thread
rohithgoudbuyyani marked this conversation as resolved.

Then verify consent should ask user to proceed in attention page
And clicks on proceed button in attention page
And clicks on proceed button in next page
Then select the e-kyc verification provider
And clicks on proceed button in e-kyc verification provider page
And user select the check box in terms and condition page
And user clicks on proceed button in terms and condition page
And user clicks on proceed button in camera preview page
And user is navigated to consent screen once liveness check completes
And verify user is navigated to consent screen

Then user verify the header of essential claims
And user verify the list of essential claims are present

And user verify the action message in consent screen
And user verify the timer is displayed in consent screen

Examples:
| correct Otp |
| 111111 |
Loading