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
51 changes: 51 additions & 0 deletions ui-test/src/main/java/pages/EkycPage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package pages;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;

import base.BasePage;

public class EkycPage extends BasePage {

public EkycPage(WebDriver driver) {
super(driver);
PageFactory.initElements(driver, this);
}

@FindBy(id = "tnc-header")
WebElement ekycProcessStepsScreenLabel;

@FindBy(id = "step-label-0")
WebElement eKycStep1Title;

@FindBy(id = "step-description-0")
WebElement eKycStep1Subtitle;

@FindBy(id = "step-label-1")
WebElement eKycStep2Title;

@FindBy(id = "step-description-1")
WebElement eKycStep2Subtitle;

public boolean isEkycProcessStepsScreenLabelDisplayed() {
return isElementVisible(ekycProcessStepsScreenLabel);
}

public boolean isEkycStep1TitleChooseEkycProviderDisplayed() {
return isElementVisible(eKycStep1Title);
}

public boolean isEkycStep1SubtitleDisplayed() {
return isElementVisible(eKycStep1Subtitle);
}

public boolean isEkycStep2TitleTermsAndConditionsDisplayed() {
return isElementVisible(eKycStep2Title);
}

public boolean isEkycStep2SubtitleDisplayed() {
return isElementVisible(eKycStep2Subtitle);
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}
47 changes: 47 additions & 0 deletions ui-test/src/main/java/stepdefinitions/EkycStepDefinition.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package stepdefinitions;

import org.testng.Assert;

import org.openqa.selenium.WebDriver;
import org.apache.log4j.Logger;

import base.BaseTest;
import io.cucumber.java.en.Then;
import pages.EkycPage;

public class EkycStepDefinition {

public WebDriver driver;
private static final Logger logger = Logger.getLogger(EkycStepDefinition.class);
EkycPage ekycPage;

public EkycStepDefinition(BaseTest baseTest) {
this.driver = baseTest.getDriver();
ekycPage = new EkycPage(driver);
}

@Then("verify user navigate to eKYC Process Steps screen")
public void verifyUserNavigateToEKycProcessStepsScreen() {
Assert.assertTrue(ekycPage.isEkycProcessStepsScreenLabelDisplayed(), "User didn't navigated to eKYC Process Steps screen");
}

@Then("user verify the title of step 1 is Choose an eKYC provider")
public void userVerifyTitleOfStep1IsChooseEkycProvider() {
Assert.assertTrue(ekycPage.isEkycStep1TitleChooseEkycProviderDisplayed(), "Title of the ekyc step 1 not displayed");
}

@Then("user verify that the subtitle of step 1 is displayed in eKYC Process Steps screen")
public void userVerifyTheSubtitleOfStep1() {
Assert.assertTrue(ekycPage.isEkycStep1SubtitleDisplayed(), "Subtitle of the ekyc step 1 not displayed");
}

@Then("user verify the title of step 2 is Terms And Conditions")
public void userVerifyTitleOfStep2IsTermsAndConditions() {
Assert.assertTrue(ekycPage.isEkycStep2TitleTermsAndConditionsDisplayed(), "Title of the ekyc step 2 not displayed");
}

@Then("user verify that the subtitle of step 2 is displayed in eKYC Process Steps screen")
public void userVerifyTheSubtitleOfStep2() {
Assert.assertTrue(ekycPage.isEkycStep2SubtitleDisplayed(), "Subtitle of the ekyc step 2 not displayed");
}
}
26 changes: 26 additions & 0 deletions ui-test/src/main/resources/featurefiles/EkycPage.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@smokeAndRegression
Feature: Esignet eKyc Page
This feature file is for verifying the eKyc page

@smoke @eKycStepsPageVerification
Scenario Outline: Verify eKYC process steps screen content
When click on Language selection option
And select the mandatory language
And user click on Login with Otp
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

Then verify consent should ask user to proceed in attention page
And clicks on proceed button in attention page
Comment thread
rachanaspsoratur marked this conversation as resolved.
Then verify user navigate to eKYC Process Steps screen
And user verify the title of step 1 is Choose an eKYC provider
And user verify that the subtitle of step 1 is displayed in eKYC Process Steps screen
And user verify the title of step 2 is Terms And Conditions
And user verify that the subtitle of step 2 is displayed in eKYC Process Steps screen

Examples:
| correct Otp |
| 111111 |

Loading