-
Notifications
You must be signed in to change notification settings - Fork 165
MOSIP-44540:Automate the testcases of eKYC process steps #1671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c653b51
MOSIP-44540:Automate the testcases of eKYC process steps
Rachana-SP 089b57c
MOSIP-44540:Resloved the CodeRabbit comment
Rachana-SP f37b99b
MOSIP-44540:Resloved the comment
Rachana-SP ef7947c
MOSIP-44540:comments resloved
Rachana-SP ca315c3
MOSIP-44540:Resloved comments
Rachana-SP 1a60015
MOSIP-44540:Resloved comments
Rachana-SP 49f909e
MOSIP-44540:Resloved comments
Rachana-SP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | ||
| } | ||
| } | ||
47 changes: 47 additions & 0 deletions
47
ui-test/src/main/java/stepdefinitions/EkycStepDefinition.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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"); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
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 | | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.