mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 13:38:01 -05:00
[MOSIP-39774- INJIMOB-3197] Automation for the story inji wallet UI (#1889)
* MOSIP-39892 Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in> * MOSIP-40489 Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in> * resolve conflicts Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in> * resolve conflicts Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in> * MOSIP-40976 MOSIP-39774 Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in> * Update DetailedVcViewPage.java Signed-off-by: anup-nehe <anup.nehe@technoforte.co.in> * Update pom.xml Signed-off-by: anup-nehe <anup.nehe@technoforte.co.in> * Update SunbirdLoginPage.java Signed-off-by: anup-nehe <anup.nehe@technoforte.co.in> --------- Signed-off-by: Anup Nehe <anup.nehe@technoforte.co.in> Signed-off-by: anup-nehe <anup.nehe@technoforte.co.in>
This commit is contained in:
@@ -140,6 +140,7 @@
|
||||
<methods>
|
||||
<include name="downloadAndVerifyHistoryUsingUinViaEsignet"/>
|
||||
<include name="downloadAndVerifyHistoryForSunbird"/>
|
||||
<include name="downloadAndVerifyVcUsingMdlDeleteAndVerifyHistory"/>
|
||||
</methods>
|
||||
</class>
|
||||
<class name="androidTestCases.VerifyWelcomePagesTest">
|
||||
@@ -158,9 +159,13 @@
|
||||
<!-- <include name="verifyTuvaliVersion"/> invalid testcase-->
|
||||
</methods>
|
||||
</class>
|
||||
<class name="androidTestCases.VcDownloadAndVerifyUsingMockIdentity">
|
||||
<class name="androidTestCases.VcDownloadAndVerifyUsingMdl">
|
||||
<methods>
|
||||
<include name="downloadAndVerifyVcUsingUinViaMockIdentity"/>
|
||||
<include name="downloadAndVerifyVcUsingInvalidCredentials"/>
|
||||
<include name="downloadAndVerifyVcUsingInvalidOtp"/>
|
||||
<include name="downloadAndVerifyVcUsingViaMdlAndPinAndUnpin"/>
|
||||
<include name="downloadAndVerifyVcUsingUinViaMdlMultipleTime"/>
|
||||
</methods>
|
||||
</class>
|
||||
<class name="androidTestCases.keyManagement">
|
||||
|
||||
@@ -113,6 +113,8 @@
|
||||
<include name="downloadAndVerifyHistoryUsingVidViaEsignet"/>
|
||||
<include name="downloadAndVerifyHistoryForSunbird"/>
|
||||
<include name="downloadVcAndVerifyActivityLog"/>
|
||||
<include name="downloadAndVerifyVcUsingMdlDeleteAndVerifyHistory"/>
|
||||
<include name="downloadAndVerifyVcUsingMockDeleteAndVerifyHistory"/>
|
||||
</methods>
|
||||
</class>
|
||||
<class name="iosTestCases.VerifyWelcomePagesTest">
|
||||
@@ -137,9 +139,13 @@
|
||||
<include name="verifyAppId"/>
|
||||
</methods>
|
||||
</class>
|
||||
<class name="iosTestCases.VcDownloadAndVerifyUsingMockIdentityTest">
|
||||
<class name="iosTestCases.VcDownloadAndVerifyUsingMdl">
|
||||
<methods>
|
||||
<include name="downloadAndVerifyVcUsingUinViaMocke"/>
|
||||
<include name="downloadAndVerifyVcUsingMdl"/>
|
||||
<include name="downloadAndVerifyVcUsingInvalidCredentials"/>
|
||||
<include name="downloadAndVerifyVcUsingInvalidOtp"/>
|
||||
<include name="downloadAndVerifyVcUsingViaMdlAndPinAndUnpin"/>
|
||||
<include name="downloadAndVerifyVcUsingViaMdlMultipleTimes"/>
|
||||
</methods>
|
||||
</class>
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
<dependency>
|
||||
<groupId>com.browserstack</groupId>
|
||||
<artifactId>browserstack-java-sdk</artifactId>
|
||||
<version>LATEST</version>
|
||||
<version>1.31.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -208,4 +208,4 @@
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
</project>
|
||||
|
||||
@@ -6,6 +6,7 @@ import io.appium.java_client.pagefactory.iOSXCUITFindBy;
|
||||
import org.openqa.selenium.WebElement;
|
||||
|
||||
public class AboutInjiPage extends BasePage {
|
||||
BasePage basePage = new BasePage(driver);
|
||||
@AndroidFindBy(accessibility = "aboutInji")
|
||||
@iOSXCUITFindBy(accessibility = "aboutInji")
|
||||
private WebElement aboutInjiHeader;
|
||||
@@ -57,7 +58,10 @@ public class AboutInjiPage extends BasePage {
|
||||
return this.isElementDisplayed(aboutInjiHeader);
|
||||
}
|
||||
|
||||
|
||||
public String getAboutInjiHeader() {
|
||||
basePage.retryToGetElement(aboutInjiHeader);
|
||||
return this.getTextFromLocator(aboutInjiHeader);
|
||||
}
|
||||
public boolean isAppIdCopiedTextDisplayed() {
|
||||
return this.isElementDisplayed(copied);
|
||||
}
|
||||
|
||||
@@ -74,10 +74,19 @@ public class AddNewCardPage extends BasePage{
|
||||
@iOSXCUITFindBy(accessibility = "credentialTypeHeading-DrivingLicenseCredential")
|
||||
private WebElement credentialTypeHeadingMockVerifiableCredential_mdoc;
|
||||
|
||||
@AndroidFindBy(accessibility = "credentialTypeHeading-MockVerifiableCredential")
|
||||
@iOSXCUITFindBy(accessibility = "credentialTypeHeading-MockVerifiableCredential")
|
||||
private WebElement credentialTypeHeadingMockVerifiableCredential;
|
||||
|
||||
@AndroidFindBy(xpath = "//*[@resource-id=\"issuerSearchBar\"]")
|
||||
@iOSXCUITFindBy(accessibility = "issuerSearchBar")
|
||||
private WebElement IssuerSearchBar;
|
||||
|
||||
@AndroidFindBy(accessibility = "issuerHeading-Mock(Collab)")
|
||||
@iOSXCUITFindBy(accessibility = "issuerHeading-Mock(Collab)")
|
||||
private WebElement downloadViaMock;
|
||||
|
||||
|
||||
public AddNewCardPage(AppiumDriver driver) {
|
||||
super(driver);
|
||||
}
|
||||
@@ -222,4 +231,23 @@ public class AddNewCardPage extends BasePage{
|
||||
return new MockCertifyLoginPage(driver);
|
||||
}
|
||||
|
||||
public void clickOnDownloadViaMock() {
|
||||
if (isElementDisplayed(IssuerSearchBar)) {
|
||||
clearTextBoxAndSendKeys(IssuerSearchBar, "mock");
|
||||
}
|
||||
clickOnElement(downloadViaMock);
|
||||
if (isElementDisplayed(downloadViaMock)) {
|
||||
clickOnElement(downloadViaMock);
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(3000);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
if (isElementDisplayed(credentialTypeHeadingMockVerifiableCredential)) {
|
||||
clickOnElement(credentialTypeHeadingMockVerifiableCredential);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,8 +83,8 @@ public class DetailedVcViewPage extends BasePage{
|
||||
@iOSXCUITFindBy(accessibility = "credentialRegistryValue")
|
||||
private WebElement credentialRegistryValue;
|
||||
|
||||
@AndroidFindBy(accessibility = "mosip-logo")
|
||||
@iOSXCUITFindBy(accessibility = "mosip-logo")
|
||||
@AndroidFindBy(accessibility = "issuerLogo")
|
||||
@iOSXCUITFindBy(accessibility = "issuerLogo")
|
||||
private WebElement esignetLogo;
|
||||
|
||||
@AndroidFindBy(accessibility = "goBack")
|
||||
@@ -215,4 +215,4 @@ public class DetailedVcViewPage extends BasePage{
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class EsignetLoginPage extends BasePage {
|
||||
@iOSXCUITFindBy(xpath = "//*[contains(@text,'Please enter your UIN/VID'')]")
|
||||
private WebElement enterYourVidTextHeader;
|
||||
|
||||
@AndroidFindBy(uiAutomator = "UiSelector().className(\"android.widget.EditText\").instance(0)")
|
||||
@AndroidFindBy(xpath = "//android.widget.EditText[@resource-id=\"Otp_mosip-vid\"]")
|
||||
@iOSXCUITFindBy(className = "XCUIElementTypeTextField")
|
||||
private WebElement enterIdTextBox;
|
||||
|
||||
|
||||
@@ -22,6 +22,11 @@ public class HistoryPage extends BasePage {
|
||||
@iOSXCUITFindBy(className = "android.widget.TextView")
|
||||
private WebElement activityLogHeader;
|
||||
|
||||
@iOSXCUITFindBy(accessibility = "Mobile Driving License is downloaded.")
|
||||
private WebElement mdlHistoryMessage;
|
||||
|
||||
|
||||
|
||||
|
||||
public HistoryPage(AppiumDriver driver) {
|
||||
super(driver);
|
||||
@@ -50,6 +55,25 @@ public class HistoryPage extends BasePage {
|
||||
return this.isElementDisplayed(locator);
|
||||
}
|
||||
|
||||
private boolean verifyHistoryAndroidformdl() {
|
||||
By locator = By.xpath("//*[contains(@text,'Mobile Driving License is downloaded.')]");
|
||||
return this.isElementDisplayed(locator);
|
||||
}
|
||||
|
||||
private boolean verifyHistoryAndroidforMock() {
|
||||
By locator = By.xpath("//*[@name=\"Mock Verifiable Credential is downloaded.\"]");
|
||||
return this.isElementDisplayed(locator);
|
||||
}
|
||||
|
||||
private boolean verifyHistoryIosMock() {
|
||||
By locator = By.xpath("//*[@name=\"Mock Verifiable Credential is downloaded.\"]");
|
||||
return this.isElementDisplayed(locator);
|
||||
}
|
||||
private boolean verifyHistoryIosmdl() {
|
||||
By locator = By.xpath("//XCUIElementTypeStaticText[@name=\"Mobile Driving License is downloaded.\"]");
|
||||
return this.isElementDisplayed(locator);
|
||||
}
|
||||
|
||||
private boolean verifyHistoryIosInsuranceCard(String vcNumber) {
|
||||
By locator = By.xpath("//*[@name=\"Health Insurance is downloaded.\"]");
|
||||
return this.isElementDisplayed(locator);
|
||||
@@ -103,6 +127,28 @@ public class HistoryPage extends BasePage {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean verifyHistory( Target os) {
|
||||
switch (os) {
|
||||
case ANDROID:
|
||||
return verifyHistoryAndroidformdl();
|
||||
case IOS:
|
||||
return verifyHistoryIosmdl();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean verifyHistoryForMock( Target os) {
|
||||
switch (os) {
|
||||
case ANDROID:
|
||||
return verifyHistoryAndroidforMock();
|
||||
case IOS:
|
||||
return verifyHistoryIosMock();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public boolean verifyHistoryForInsuranceCard(String vcNumber, Target os) {
|
||||
switch (os) {
|
||||
case ANDROID:
|
||||
|
||||
@@ -31,6 +31,10 @@ public class HomePage extends BasePage {
|
||||
@AndroidFindBy(accessibility = "ellipsis")
|
||||
private WebElement moreOptionsButton;
|
||||
|
||||
@iOSXCUITFindBy(accessibility = "iconIcon")
|
||||
@AndroidFindBy(accessibility = "iconIcon")
|
||||
private WebElement iconIconButton;
|
||||
|
||||
@iOSXCUITFindBy(xpath = "(//XCUIElementTypeOther[@name=\"ellipsis\"])[2]")
|
||||
@AndroidFindBy(xpath = "(//android.view.ViewGroup[@content-desc=\"ellipsis\"])[2]")
|
||||
private WebElement moreOptionsButtonForSecondVc;
|
||||
@@ -241,6 +245,12 @@ public class HomePage extends BasePage {
|
||||
@iOSXCUITFindBy(accessibility = "cardViewDescription")
|
||||
private WebElement cardViewDescription;
|
||||
|
||||
@AndroidFindBy(accessibility = "injiLogo")
|
||||
@iOSXCUITFindBy(accessibility = "injiLogo")
|
||||
private WebElement injiLogo;
|
||||
|
||||
|
||||
|
||||
|
||||
public HomePage(AppiumDriver driver) {
|
||||
super(driver);
|
||||
@@ -812,7 +822,13 @@ public class HomePage extends BasePage {
|
||||
}
|
||||
return this.isElementDisplayed(credentialTypeValue);
|
||||
|
||||
}
|
||||
public boolean isInjiLogoDisplayed() {
|
||||
return isElementDisplayed(injiLogo);
|
||||
}
|
||||
|
||||
public void clickOnCrossIconButton() {
|
||||
clickOnElement(iconIconButton);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,6 +6,8 @@ import io.appium.java_client.pagefactory.AndroidFindBy;
|
||||
import io.appium.java_client.pagefactory.iOSXCUITFindBy;
|
||||
import org.openqa.selenium.WebElement;
|
||||
|
||||
import java.time.Duration;
|
||||
|
||||
public class MockCertifyLoginPage extends BasePage {
|
||||
|
||||
@iOSXCUITFindBy(iOSClassChain = "**/XCUIElementTypeStaticText[`label == \"“Inji” Wants to Use “mosip.net” to Sign In\"`]")
|
||||
@@ -85,6 +87,10 @@ public class MockCertifyLoginPage extends BasePage {
|
||||
@iOSXCUITFindBy(accessibility = "credentialTypeHeading-MOSIPVerifiableCredential")
|
||||
private WebElement credentialTypeHeadingMOSIPVerifiableCredential;
|
||||
|
||||
@AndroidFindBy(xpath = "//android.widget.TextView[@text=\"Invalid Individual ID\"]")
|
||||
@iOSXCUITFindBy(accessibility = "Invalid Individual ID")
|
||||
private WebElement invalidIndividualIdText;
|
||||
|
||||
|
||||
public MockCertifyLoginPage(AppiumDriver driver) {
|
||||
super(driver);
|
||||
@@ -117,6 +123,11 @@ public class MockCertifyLoginPage extends BasePage {
|
||||
}
|
||||
|
||||
public OtpVerificationPage setEnterIdTextBox(String uinOrVid) {
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
sendKeysToTextBox(enterIdTextBox, uinOrVid);
|
||||
return new OtpVerificationPage(driver);
|
||||
}
|
||||
@@ -216,5 +227,7 @@ public class MockCertifyLoginPage extends BasePage {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public boolean isInvalidIndividualIdTextDisplayed(){
|
||||
return isElementDisplayed(invalidIndividualIdText);
|
||||
}
|
||||
}
|
||||
@@ -63,12 +63,12 @@ public class SunbirdLoginPage extends BasePage {
|
||||
@iOSXCUITFindBy(accessibility = "wallet-activated-icon")
|
||||
private WebElement activatedStatus;
|
||||
|
||||
@AndroidFindBy(accessibility = "a Veridonia logo")
|
||||
@iOSXCUITFindBy(accessibility = "a Veridonia logo")
|
||||
@AndroidFindBy(accessibility = "issuerLogo")
|
||||
@iOSXCUITFindBy(accessibility = "issuerLogo")
|
||||
private WebElement sunbirdLogo;
|
||||
|
||||
@AndroidFindBy(accessibility = "a square logo of a Sunbird")
|
||||
@iOSXCUITFindBy(accessibility = "a square logo of a Sunbird")
|
||||
@AndroidFindBy(accessibility = "issuerLogo")
|
||||
@iOSXCUITFindBy(accessibility = "issuerLogo")
|
||||
private WebElement sunbirdSquareLogo;
|
||||
|
||||
@AndroidFindBy(accessibility = "fullNameValue")
|
||||
@@ -344,4 +344,4 @@ if (isElementDisplayed(setButton)){
|
||||
return this.isElementDisplayed(statusIcon);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +102,8 @@ public class TestDataReader {
|
||||
return "true";
|
||||
case "MockVc":
|
||||
return "9261481024";
|
||||
case "Mock":
|
||||
return "1231231231";
|
||||
case "idTypeForMobileDrivingLicense":
|
||||
return "Mobile Driving License";
|
||||
default:
|
||||
|
||||
@@ -6,6 +6,7 @@ import inji.pages.*;
|
||||
import inji.utils.TestDataReader;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
public class AboutInjiTest extends AndroidBaseTest {
|
||||
@@ -36,7 +37,7 @@ public class AboutInjiTest extends AndroidBaseTest {
|
||||
AboutInjiPage aboutInjiPage = settingsPage.clickOnAbouInji();
|
||||
|
||||
assertTrue(aboutInjiPage.isAboutInjiHeaderDisplayed(), "Verify id about inji page displayed");
|
||||
|
||||
assertEquals(aboutInjiPage.getAboutInjiHeader(),"ABOUT INJI WALLET");
|
||||
aboutInjiPage.clickOnCopyText();
|
||||
assertTrue(aboutInjiPage.isAppIdCopiedTextDisplayed(), "verify if app id is copied");
|
||||
|
||||
|
||||
@@ -0,0 +1,293 @@
|
||||
package androidTestCases;
|
||||
|
||||
import BaseTest.AndroidBaseTest;
|
||||
import inji.api.BaseTestCase;
|
||||
import inji.constants.Target;
|
||||
import inji.pages.*;
|
||||
import inji.utils.TestDataReader;
|
||||
import org.testng.annotations.Test;
|
||||
import org.testng.asserts.SoftAssert;
|
||||
|
||||
import static inji.api.BaseTestCase.uin;
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
public class VcDownloadAndVerifyUsingMdl extends AndroidBaseTest {
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingUinViaMockIdentity() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
|
||||
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
|
||||
|
||||
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
|
||||
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
|
||||
|
||||
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
|
||||
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
|
||||
|
||||
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
|
||||
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.ANDROID);
|
||||
|
||||
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
|
||||
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.ANDROID);
|
||||
|
||||
homePage.clickOnNextButtonForInjiTour();
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
|
||||
|
||||
mockCertifyLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
assertTrue(mockCertifyLoginPage.isEnterYourVidTextDisplayed(), "Verify if enter your vid text is displayed");
|
||||
|
||||
OtpVerificationPage otpVerification= mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
|
||||
|
||||
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.ANDROID);
|
||||
mockCertifyLoginPage.clickOnVerifyButton();
|
||||
|
||||
assertTrue(homePage.isCredentialTypeValueDisplayed(), "Verify if credential type value is displayed");
|
||||
DetailedVcViewPage detailedVcViewPage = homePage.openDetailedVcView();
|
||||
|
||||
detailedVcViewPage.clickOnQrCodeButton();
|
||||
SoftAssert softAssert = new SoftAssert();
|
||||
softAssert.assertTrue(detailedVcViewPage.isQrCodeDisplayed(), "Verify if QR Code header is displayed");
|
||||
|
||||
detailedVcViewPage.clickOnQrCrossIcon();
|
||||
assertTrue(detailedVcViewPage.isEsignetLogoDisplayed(), "Verify if detailed Vc esignet logo is displayed");
|
||||
assertTrue(detailedVcViewPage.isDetailedVcViewPageLoaded(), "Verify if detailed Vc view page is displayed");
|
||||
// assertEquals(detailedVcViewPage.getNameInDetailedVcView(), TestDataReader.readData("fullNameForMobileDrivingLicense"), "Verify if full name is displayed");
|
||||
// assertEquals(detailedVcViewPage.getDateOfBirthInDetailedVcView(), TestDataReader.readData("dateOfBirthForMobileDrivingLicense"), "Verify if date of birth is displayed");
|
||||
assertEquals(detailedVcViewPage.getIdTypeValueInDetailedVcView(), TestDataReader.readData("idTypeForMobileDrivingLicense"), "Verify if id type is displayed");
|
||||
assertEquals(detailedVcViewPage.getStatusInDetailedVcView(), TestDataReader.readData("status"), "Verify if status is displayed");
|
||||
// assertTrue(detailedVcViewPage.isKeyTypeVcDetailViewValueDisplayed(), "Verify if key type detailed Vc value displayed");
|
||||
detailedVcViewPage.clickOnBackArrow();
|
||||
assertTrue(detailedVcViewPage.isEsignetLogoDisplayed(), "Verify if detailed Vc esignet logo is displayed");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingInvalidCredentials() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
|
||||
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
|
||||
|
||||
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
|
||||
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
|
||||
|
||||
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
|
||||
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
|
||||
|
||||
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
|
||||
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.ANDROID);
|
||||
|
||||
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
|
||||
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.ANDROID);
|
||||
|
||||
homePage.clickOnNextButtonForInjiTour();
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
|
||||
|
||||
mockCertifyLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
assertTrue(mockCertifyLoginPage.isEnterYourVidTextDisplayed(), "Verify if enter your vid text is displayed");
|
||||
|
||||
OtpVerificationPage otpVerification= mockCertifyLoginPage.setEnterIdTextBox(uin);
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
assertTrue(mockCertifyLoginPage.isInvalidIndividualIdTextDisplayed(),"verify if invalid individual id is displayed");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingInvalidOtp() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
|
||||
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
|
||||
|
||||
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
|
||||
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
|
||||
|
||||
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
|
||||
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
|
||||
|
||||
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
|
||||
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.ANDROID);
|
||||
|
||||
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
|
||||
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.ANDROID);
|
||||
|
||||
homePage.clickOnNextButtonForInjiTour();
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
|
||||
|
||||
mockCertifyLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
assertTrue(mockCertifyLoginPage.isEnterYourVidTextDisplayed(), "Verify if enter your vid text is displayed");
|
||||
|
||||
OtpVerificationPage otpVerification = mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(), "verify if otp page is displayed");
|
||||
|
||||
otpVerification.enterOtpForEsignet(TestDataReader.readData("invalidOtp"), Target.ANDROID);
|
||||
mockCertifyLoginPage.clickOnVerifyButton();
|
||||
assertTrue(mockCertifyLoginPage.isInvalidOtpMessageDisplayed(), "Verify if invalid otp text is displayed");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingViaMdlAndPinAndUnpin() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
|
||||
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
|
||||
|
||||
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
|
||||
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
|
||||
|
||||
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
|
||||
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
|
||||
|
||||
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
|
||||
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.ANDROID);
|
||||
|
||||
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
|
||||
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.ANDROID);
|
||||
|
||||
homePage.clickOnNextButtonForInjiTour();
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
|
||||
|
||||
mockCertifyLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
assertTrue(mockCertifyLoginPage.isEnterYourVidTextDisplayed(), "Verify if enter your vid text is displayed");
|
||||
|
||||
OtpVerificationPage otpVerification= mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
|
||||
|
||||
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.ANDROID);
|
||||
mockCertifyLoginPage.clickOnVerifyButton();
|
||||
|
||||
assertTrue(homePage.isCredentialTypeValueDisplayed(), "Verify if credential type value is displayed");
|
||||
MoreOptionsPage moreOptionsPage = homePage.clickOnMoreOptionsButton();
|
||||
|
||||
assertTrue(moreOptionsPage.isMoreOptionsPageLoaded(), "Verify if more options page is displayed");
|
||||
moreOptionsPage.clickOnPinOrUnPinCard();
|
||||
|
||||
assertTrue(homePage.isPinIconDisplayed(), "Verify if pin icon on vc is displayed");
|
||||
homePage.clickOnMoreOptionsButton();
|
||||
assertTrue(moreOptionsPage.isMoreOptionsPageLoaded(), "Verify if more options page is displayed");
|
||||
moreOptionsPage.clickOnPinOrUnPinCard();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingUinViaMdlMultipleTime() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
|
||||
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
|
||||
|
||||
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
|
||||
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
|
||||
|
||||
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
|
||||
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
|
||||
|
||||
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
|
||||
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.ANDROID);
|
||||
|
||||
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
|
||||
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.ANDROID);
|
||||
|
||||
homePage.clickOnNextButtonForInjiTour();
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
|
||||
|
||||
mockCertifyLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
assertTrue(mockCertifyLoginPage.isEnterYourVidTextDisplayed(), "Verify if enter your vid text is displayed");
|
||||
|
||||
OtpVerificationPage otpVerification= mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
|
||||
|
||||
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.ANDROID);
|
||||
mockCertifyLoginPage.clickOnVerifyButton();
|
||||
|
||||
assertTrue(homePage.isCredentialTypeValueDisplayed(), "Verify if credential type value is displayed");
|
||||
|
||||
homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
addNewCardPage.clickOnDownloadViaMockCertify();
|
||||
|
||||
mockCertifyLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
assertTrue(mockCertifyLoginPage.isEnterYourVidTextDisplayed(), "Verify if enter your vid text is displayed");
|
||||
|
||||
mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
|
||||
|
||||
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.ANDROID);
|
||||
mockCertifyLoginPage.clickOnVerifyButton();
|
||||
assertTrue(homePage.isCredentialTypeValueDisplayed(), "Verify if credential type value is displayed");
|
||||
}
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
package androidTestCases;
|
||||
|
||||
import BaseTest.AndroidBaseTest;
|
||||
import inji.api.BaseTestCase;
|
||||
import inji.constants.Target;
|
||||
import inji.pages.*;
|
||||
import inji.utils.TestDataReader;
|
||||
import org.testng.annotations.Test;
|
||||
import org.testng.asserts.SoftAssert;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
public class VcDownloadAndVerifyUsingMockIdentity extends AndroidBaseTest {
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingUinViaMockIdentity() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
|
||||
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
|
||||
|
||||
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
|
||||
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
|
||||
|
||||
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
|
||||
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
|
||||
|
||||
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
|
||||
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.ANDROID);
|
||||
|
||||
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
|
||||
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.ANDROID);
|
||||
|
||||
homePage.clickOnNextButtonForInjiTour();
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
|
||||
|
||||
mockCertifyLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
assertTrue(mockCertifyLoginPage.isEnterYourVidTextDisplayed(), "Verify if enter your vid text is displayed");
|
||||
|
||||
OtpVerificationPage otpVerification= mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
|
||||
|
||||
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.ANDROID);
|
||||
mockCertifyLoginPage.clickOnVerifyButton();
|
||||
|
||||
assertTrue(homePage.isCredentialTypeValueDisplayed(), "Verify if credential type value is displayed");
|
||||
DetailedVcViewPage detailedVcViewPage = homePage.openDetailedVcView();
|
||||
|
||||
detailedVcViewPage.clickOnQrCodeButton();
|
||||
SoftAssert softAssert = new SoftAssert();
|
||||
softAssert.assertTrue(detailedVcViewPage.isQrCodeDisplayed(), "Verify if QR Code header is displayed");
|
||||
|
||||
detailedVcViewPage.clickOnQrCrossIcon();
|
||||
assertTrue(detailedVcViewPage.isEsignetLogoDisplayed(), "Verify if detailed Vc esignet logo is displayed");
|
||||
assertTrue(detailedVcViewPage.isDetailedVcViewPageLoaded(), "Verify if detailed Vc view page is displayed");
|
||||
// assertEquals(detailedVcViewPage.getNameInDetailedVcView(), TestDataReader.readData("fullNameForMobileDrivingLicense"), "Verify if full name is displayed");
|
||||
// assertEquals(detailedVcViewPage.getDateOfBirthInDetailedVcView(), TestDataReader.readData("dateOfBirthForMobileDrivingLicense"), "Verify if date of birth is displayed");
|
||||
assertEquals(detailedVcViewPage.getIdTypeValueInDetailedVcView(), TestDataReader.readData("idTypeForMobileDrivingLicense"), "Verify if id type is displayed");
|
||||
assertEquals(detailedVcViewPage.getStatusInDetailedVcView(), TestDataReader.readData("status"), "Verify if status is displayed");
|
||||
// assertTrue(detailedVcViewPage.isKeyTypeVcDetailViewValueDisplayed(), "Verify if key type detailed Vc value displayed");
|
||||
detailedVcViewPage.clickOnBackArrow();
|
||||
assertTrue(detailedVcViewPage.isEsignetLogoDisplayed(), "Verify if detailed Vc esignet logo is displayed");
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ import inji.constants.Target;
|
||||
import inji.pages.*;
|
||||
import inji.utils.TestDataReader;
|
||||
import org.testng.annotations.Test;
|
||||
import org.testng.asserts.SoftAssert;
|
||||
|
||||
import static inji.api.AdminTestUtil.fullName;
|
||||
import static inji.api.AdminTestUtil.policyNumber;
|
||||
@@ -466,4 +467,124 @@ public class VerifyHistoryTest extends AndroidBaseTest {
|
||||
HistoryPage historyPage = new HistoryPage(driver);
|
||||
assertTrue(historyPage.verifyHistory(uin, Target.ANDROID));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingMdlDeleteAndVerifyHistory() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
|
||||
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
|
||||
|
||||
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
|
||||
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
|
||||
|
||||
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
|
||||
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
|
||||
|
||||
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
|
||||
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.ANDROID);
|
||||
|
||||
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
|
||||
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.ANDROID);
|
||||
|
||||
homePage.clickOnNextButtonForInjiTour();
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
|
||||
|
||||
mockCertifyLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
assertTrue(mockCertifyLoginPage.isEnterYourVidTextDisplayed(), "Verify if enter your vid text is displayed");
|
||||
|
||||
OtpVerificationPage otpVerification= mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
|
||||
|
||||
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.ANDROID);
|
||||
mockCertifyLoginPage.clickOnVerifyButton();
|
||||
|
||||
assertTrue(homePage.isCredentialTypeValueDisplayed(), "Verify if credential type value is displayed");
|
||||
MoreOptionsPage moreOptionsPage = homePage.clickOnMoreOptionsButton();
|
||||
assertTrue(moreOptionsPage.isMoreOptionsPageLoaded(), "Verify if more options page is displayed");
|
||||
|
||||
moreOptionsPage.clickOnViewActivityLog();
|
||||
HistoryPage historyPage = new HistoryPage(driver);
|
||||
assertTrue(historyPage.verifyHistory(Target.ANDROID));
|
||||
homePage.clickOnCrossIconButton();
|
||||
|
||||
homePage.clickOnMoreOptionsButton();
|
||||
assertTrue(moreOptionsPage.isMoreOptionsPageLoaded(), "Verify if more options page is displayed");
|
||||
moreOptionsPage.clickOnViewActivityLog();
|
||||
assertTrue(historyPage.verifyHistory(Target.ANDROID));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingMockDeleteAndVerifyHistory() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
|
||||
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
|
||||
|
||||
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
|
||||
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
|
||||
|
||||
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
|
||||
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
|
||||
|
||||
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
|
||||
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.ANDROID);
|
||||
|
||||
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
|
||||
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.ANDROID);
|
||||
|
||||
homePage.clickOnNextButtonForInjiTour();
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
MockCertifyLoginPage mockCertifyLoginPage = new MockCertifyLoginPage(driver);
|
||||
|
||||
addNewCardPage.clickOnDownloadViaMock();
|
||||
mockCertifyLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
assertTrue(mockCertifyLoginPage.isEnterYourVidTextDisplayed(), "Verify if enter your vid text is displayed");
|
||||
|
||||
OtpVerificationPage otpVerification= mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("Mock"));
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
|
||||
|
||||
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.ANDROID);
|
||||
mockCertifyLoginPage.clickOnVerifyButton();
|
||||
|
||||
assertTrue(homePage.isCredentialTypeValueDisplayed(), "Verify if credential type value is displayed");
|
||||
MoreOptionsPage moreOptionsPage = homePage.clickOnMoreOptionsButton();
|
||||
assertTrue(moreOptionsPage.isMoreOptionsPageLoaded(), "Verify if more options page is displayed");
|
||||
|
||||
moreOptionsPage.clickOnViewActivityLog();
|
||||
HistoryPage historyPage = new HistoryPage(driver);
|
||||
assertTrue(historyPage.verifyHistory(Target.ANDROID));
|
||||
homePage.clickOnCrossIconButton();
|
||||
|
||||
homePage.clickOnMoreOptionsButton();
|
||||
assertTrue(moreOptionsPage.isMoreOptionsPageLoaded(), "Verify if more options page is displayed");
|
||||
moreOptionsPage.clickOnViewActivityLog();
|
||||
assertTrue(historyPage.verifyHistoryForMock(Target.ANDROID));
|
||||
}
|
||||
}
|
||||
@@ -117,7 +117,7 @@ public class keyManagement extends AndroidBaseTest {
|
||||
|
||||
assertTrue(mockCertifyLoginPage.isEnterYourVidTextDisplayed(), "Verify if enter your vid text is displayed");
|
||||
|
||||
OtpVerificationPage otpVerification = mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
|
||||
OtpVerificationPage otpVerification = mockCertifyLoginPage.setEnterIdTextBox("9261481024");
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(), "verify if otp page is displayed");
|
||||
|
||||
@@ -6,6 +6,7 @@ import inji.pages.*;
|
||||
import inji.utils.TestDataReader;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
public class AboutInjiTest extends IosBaseTest {
|
||||
@@ -36,6 +37,7 @@ public class AboutInjiTest extends IosBaseTest {
|
||||
AboutInjiPage aboutInjiPage = settingsPage.clickOnAbouInji();
|
||||
|
||||
assertTrue(aboutInjiPage.isAboutInjiHeaderDisplayed(),"Verify id about inji page displayed");
|
||||
assertEquals(aboutInjiPage.getAboutInjiHeader(),"ABOUT INJI WALLET");
|
||||
|
||||
aboutInjiPage.clickOnCopyText();
|
||||
assertTrue(aboutInjiPage.isAppIdCopiedTextDisplayed(),"verify if app id is copied");
|
||||
|
||||
@@ -0,0 +1,291 @@
|
||||
package iosTestCases;
|
||||
|
||||
import BaseTest.IosBaseTest;
|
||||
import inji.api.BaseTestCase;
|
||||
import inji.constants.Target;
|
||||
import inji.pages.*;
|
||||
import inji.utils.TestDataReader;
|
||||
import org.testng.annotations.Test;
|
||||
import org.testng.asserts.SoftAssert;
|
||||
|
||||
import static org.testng.Assert.*;
|
||||
|
||||
public class VcDownloadAndVerifyUsingMdl extends IosBaseTest {
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingMdl() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
|
||||
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
|
||||
|
||||
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
|
||||
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
|
||||
|
||||
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
|
||||
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
|
||||
|
||||
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
|
||||
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.IOS);
|
||||
|
||||
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
|
||||
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.IOS);
|
||||
|
||||
homePage.clickOnNextButtonForInjiTour();
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
|
||||
|
||||
addNewCardPage.clickOnContinueButtonInSigninPopupIos();
|
||||
EsignetLoginPage esignetLoginPage = new EsignetLoginPage(driver);
|
||||
esignetLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
Thread.sleep(9000);
|
||||
OtpVerificationPage otpVerification = mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
// assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
|
||||
|
||||
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.IOS);
|
||||
mockCertifyLoginPage.clickOnVerifyButtonIos();
|
||||
|
||||
assertTrue(homePage.isCredentialTypeValueDisplayed(), "Verify if credential type value is displayed");
|
||||
DetailedVcViewPage detailedVcViewPage = homePage.openDetailedVcView();
|
||||
|
||||
detailedVcViewPage.clickOnQrCodeButton();
|
||||
SoftAssert softAssert = new SoftAssert();
|
||||
softAssert.assertTrue(detailedVcViewPage.isQrCodeDisplayed(), "Verify if QR Code header is displayed");
|
||||
|
||||
detailedVcViewPage.clickOnQrCrossIcon();
|
||||
assertTrue(detailedVcViewPage.isEsignetLogoDisplayed(), "Verify if detailed Vc esignet logo is displayed");
|
||||
assertTrue(detailedVcViewPage.isDetailedVcViewPageLoaded(), "Verify if detailed Vc view page is displayed");
|
||||
// assertEquals(detailedVcViewPage.getNameInDetailedVcView(), TestDataReader.readData("fullNameForMobileDrivingLicense"), "Verify if full name is displayed");
|
||||
// assertEquals(detailedVcViewPage.getDateOfBirthInDetailedVcView(), TestDataReader.readData("dateOfBirthForMobileDrivingLicense"), "Verify if date of birth is displayed");
|
||||
assertEquals(detailedVcViewPage.getIdTypeValueInDetailedVcView(), TestDataReader.readData("idTypeForMobileDrivingLicense"), "Verify if id type is displayed");
|
||||
assertEquals(detailedVcViewPage.getStatusInDetailedVcView(), TestDataReader.readData("status"), "Verify if status is displayed");
|
||||
// assertTrue(detailedVcViewPage.isKeyTypeVcDetailViewValueDisplayed(), "Verify if key type detailed Vc value displayed");
|
||||
detailedVcViewPage.clickOnBackArrow();
|
||||
assertTrue(detailedVcViewPage.isEsignetLogoDisplayed(), "Verify if detailed Vc esignet logo is displayed");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingInvalidCredentials() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
|
||||
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
|
||||
|
||||
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
|
||||
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
|
||||
|
||||
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
|
||||
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
|
||||
|
||||
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
|
||||
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.IOS);
|
||||
|
||||
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
|
||||
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.IOS);
|
||||
|
||||
homePage.clickOnNextButtonForInjiTour();
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
|
||||
|
||||
addNewCardPage.clickOnContinueButtonInSigninPopupIos();
|
||||
EsignetLoginPage esignetLoginPage = new EsignetLoginPage(driver);
|
||||
esignetLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
Thread.sleep(9000);
|
||||
OtpVerificationPage otpVerification = mockCertifyLoginPage.setEnterIdTextBox("2185461749");
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
// assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
|
||||
|
||||
assertTrue(mockCertifyLoginPage.isInvalidIndividualIdTextDisplayed(),"verify if invalid individual id is displayed");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingInvalidOtp() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
|
||||
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
|
||||
|
||||
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
|
||||
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
|
||||
|
||||
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
|
||||
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
|
||||
|
||||
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
|
||||
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.IOS);
|
||||
|
||||
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
|
||||
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.IOS);
|
||||
|
||||
homePage.clickOnNextButtonForInjiTour();
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
|
||||
|
||||
addNewCardPage.clickOnContinueButtonInSigninPopupIos();
|
||||
EsignetLoginPage esignetLoginPage = new EsignetLoginPage(driver);
|
||||
esignetLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
Thread.sleep(9000);
|
||||
OtpVerificationPage otpVerification = mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
// assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
|
||||
|
||||
otpVerification.enterOtpForEsignet(TestDataReader.readData("invalidOtp"), Target.IOS);
|
||||
mockCertifyLoginPage.clickOnVerifyButtonIos();
|
||||
|
||||
assertTrue(mockCertifyLoginPage.isInvalidOtpMessageDisplayed(), "Verify if invalid otp text is displayed");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingViaMdlAndPinAndUnpin() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
|
||||
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
|
||||
|
||||
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
|
||||
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
|
||||
|
||||
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
|
||||
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
|
||||
|
||||
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
|
||||
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.IOS);
|
||||
|
||||
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
|
||||
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.IOS);
|
||||
|
||||
homePage.clickOnNextButtonForInjiTour();
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
|
||||
|
||||
addNewCardPage.clickOnContinueButtonInSigninPopupIos();
|
||||
EsignetLoginPage esignetLoginPage = new EsignetLoginPage(driver);
|
||||
esignetLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
Thread.sleep(9000);
|
||||
OtpVerificationPage otpVerification = mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
// assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
|
||||
|
||||
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.IOS);
|
||||
mockCertifyLoginPage.clickOnVerifyButtonIos();
|
||||
|
||||
assertTrue(homePage.isCredentialTypeValueDisplayed(), "Verify if credential type value is displayed");
|
||||
assertTrue(homePage.isCredentialTypeValueDisplayed(), "Verify if credential type value is displayed");
|
||||
MoreOptionsPage moreOptionsPage = homePage.clickOnMoreOptionsButton();
|
||||
|
||||
assertTrue(moreOptionsPage.isMoreOptionsPageLoaded(), "Verify if more options page is displayed");
|
||||
moreOptionsPage.clickOnPinOrUnPinCard();
|
||||
|
||||
assertTrue(homePage.isPinIconDisplayed(), "Verify if pin icon on vc is displayed");
|
||||
homePage.clickOnMoreOptionsButton();
|
||||
assertTrue(moreOptionsPage.isMoreOptionsPageLoaded(), "Verify if more options page is displayed");
|
||||
moreOptionsPage.clickOnPinOrUnPinCard();
|
||||
assertFalse(homePage.isPinIconDisplayed(), "Verify if pin icon on vc is displayed");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingViaMdlMultipleTimes() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
|
||||
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
|
||||
|
||||
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
|
||||
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
|
||||
|
||||
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
|
||||
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
|
||||
|
||||
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
|
||||
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.IOS);
|
||||
|
||||
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
|
||||
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.IOS);
|
||||
|
||||
homePage.clickOnNextButtonForInjiTour();
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
|
||||
|
||||
addNewCardPage.clickOnContinueButtonInSigninPopupIos();
|
||||
EsignetLoginPage esignetLoginPage = new EsignetLoginPage(driver);
|
||||
esignetLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
Thread.sleep(9000);
|
||||
OtpVerificationPage otpVerification = mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
// assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
|
||||
|
||||
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.IOS);
|
||||
mockCertifyLoginPage.clickOnVerifyButtonIos();
|
||||
|
||||
assertTrue(homePage.isCredentialTypeValueDisplayed(), "Verify if credential type value is displayed");
|
||||
homePage.downloadCard();
|
||||
addNewCardPage.clickOnDownloadViaMockCertify();
|
||||
|
||||
addNewCardPage.clickOnContinueButtonInSigninPopupIos();
|
||||
esignetLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
Thread.sleep(9000);
|
||||
mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.IOS);
|
||||
mockCertifyLoginPage.clickOnVerifyButtonIos();
|
||||
|
||||
assertTrue(homePage.isCredentialTypeValueDisplayed(), "Verify if credential type value is displayed");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
package iosTestCases;
|
||||
|
||||
import BaseTest.IosBaseTest;
|
||||
import inji.api.BaseTestCase;
|
||||
import inji.constants.Target;
|
||||
import inji.pages.*;
|
||||
import inji.utils.TestDataReader;
|
||||
import org.testng.annotations.Test;
|
||||
import org.testng.asserts.SoftAssert;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
public class VcDownloadAndVerifyUsingMockIdentityTest extends IosBaseTest {
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingUinViaMocke() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
|
||||
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
|
||||
|
||||
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
|
||||
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
|
||||
|
||||
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
|
||||
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
|
||||
|
||||
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
|
||||
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.IOS);
|
||||
|
||||
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
|
||||
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.IOS);
|
||||
|
||||
homePage.clickOnNextButtonForInjiTour();
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
|
||||
|
||||
addNewCardPage.clickOnContinueButtonInSigninPopupIos();
|
||||
EsignetLoginPage esignetLoginPage = new EsignetLoginPage(driver);
|
||||
esignetLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
Thread.sleep(9000);
|
||||
OtpVerificationPage otpVerification = mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
// assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
|
||||
|
||||
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.IOS);
|
||||
mockCertifyLoginPage.clickOnVerifyButtonIos();
|
||||
|
||||
assertTrue(homePage.isCredentialTypeValueDisplayed(), "Verify if credential type value is displayed");
|
||||
DetailedVcViewPage detailedVcViewPage = homePage.openDetailedVcView();
|
||||
|
||||
detailedVcViewPage.clickOnQrCodeButton();
|
||||
SoftAssert softAssert = new SoftAssert();
|
||||
softAssert.assertTrue(detailedVcViewPage.isQrCodeDisplayed(), "Verify if QR Code header is displayed");
|
||||
|
||||
detailedVcViewPage.clickOnQrCrossIcon();
|
||||
assertTrue(detailedVcViewPage.isEsignetLogoDisplayed(), "Verify if detailed Vc esignet logo is displayed");
|
||||
assertTrue(detailedVcViewPage.isDetailedVcViewPageLoaded(), "Verify if detailed Vc view page is displayed");
|
||||
// assertEquals(detailedVcViewPage.getNameInDetailedVcView(), TestDataReader.readData("fullNameForMobileDrivingLicense"), "Verify if full name is displayed");
|
||||
// assertEquals(detailedVcViewPage.getDateOfBirthInDetailedVcView(), TestDataReader.readData("dateOfBirthForMobileDrivingLicense"), "Verify if date of birth is displayed");
|
||||
assertEquals(detailedVcViewPage.getIdTypeValueInDetailedVcView(), TestDataReader.readData("idTypeForMobileDrivingLicense"), "Verify if id type is displayed");
|
||||
assertEquals(detailedVcViewPage.getStatusInDetailedVcView(), TestDataReader.readData("status"), "Verify if status is displayed");
|
||||
// assertTrue(detailedVcViewPage.isKeyTypeVcDetailViewValueDisplayed(), "Verify if key type detailed Vc value displayed");
|
||||
detailedVcViewPage.clickOnBackArrow();
|
||||
assertTrue(detailedVcViewPage.isEsignetLogoDisplayed(), "Verify if detailed Vc esignet logo is displayed");
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import inji.pages.*;
|
||||
import inji.utils.IosUtil;
|
||||
import inji.utils.TestDataReader;
|
||||
import org.testng.annotations.Test;
|
||||
import org.testng.asserts.SoftAssert;
|
||||
|
||||
import static inji.api.AdminTestUtil.fullName;
|
||||
import static inji.api.AdminTestUtil.policyNumber;
|
||||
@@ -468,4 +469,111 @@ public class VerifyHistoryTest extends IosBaseTest {
|
||||
HistoryPage historyPage = new HistoryPage(driver);
|
||||
assertTrue(historyPage.verifyHistory(uin, Target.IOS),"verify if download history is displayed");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingMdlDeleteAndVerifyHistory() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
|
||||
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
|
||||
|
||||
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
|
||||
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
|
||||
|
||||
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
|
||||
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
|
||||
|
||||
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
|
||||
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.IOS);
|
||||
|
||||
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
|
||||
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.IOS);
|
||||
|
||||
homePage.clickOnNextButtonForInjiTour();
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
MockCertifyLoginPage mockCertifyLoginPage = addNewCardPage.clickOnDownloadViaMockCertify();
|
||||
|
||||
addNewCardPage.clickOnContinueButtonInSigninPopupIos();
|
||||
EsignetLoginPage esignetLoginPage = new EsignetLoginPage(driver);
|
||||
esignetLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
Thread.sleep(9000);
|
||||
OtpVerificationPage otpVerification = mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("MockVc"));
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
// assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
|
||||
|
||||
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.IOS);
|
||||
mockCertifyLoginPage.clickOnVerifyButtonIos();
|
||||
|
||||
assertTrue(homePage.isCredentialTypeValueDisplayed(), "Verify if credential type value is displayed");
|
||||
HistoryPage historyPage = homePage.clickOnHistoryButton();
|
||||
|
||||
assertTrue(historyPage.isHistoryPageLoaded(), "Verify if history page is displayed");
|
||||
assertTrue(historyPage.verifyHistory(Target.IOS));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void downloadAndVerifyVcUsingMockDeleteAndVerifyHistory() throws InterruptedException {
|
||||
ChooseLanguagePage chooseLanguagePage = new ChooseLanguagePage(driver);
|
||||
|
||||
assertTrue(chooseLanguagePage.isChooseLanguagePageLoaded(), "Verify if choose language page is displayed");
|
||||
WelcomePage welcomePage = chooseLanguagePage.clickOnSavePreference();
|
||||
|
||||
assertTrue(welcomePage.isWelcomePageLoaded(), "Verify if welcome page is loaded");
|
||||
AppUnlockMethodPage appUnlockMethodPage = welcomePage.clickOnSkipButton();
|
||||
|
||||
assertTrue(appUnlockMethodPage.isAppUnlockMethodPageLoaded(), "Verify if app unlocked page is displayed");
|
||||
SetPasscode setPasscode = appUnlockMethodPage.clickOnUsePasscode();
|
||||
|
||||
assertTrue(setPasscode.isSetPassCodePageLoaded(), "Verify if set passcode page is displayed");
|
||||
ConfirmPasscode confirmPasscode = setPasscode.enterPasscode(TestDataReader.readData("passcode"), Target.IOS);
|
||||
|
||||
assertTrue(confirmPasscode.isConfirmPassCodePageLoaded(), "Verify if confirm passcode page is displayed");
|
||||
HomePage homePage = confirmPasscode.enterPasscodeInConfirmPasscodePage(TestDataReader.readData("passcode"), Target.IOS);
|
||||
|
||||
homePage.clickOnNextButtonForInjiTour();
|
||||
assertTrue(homePage.isHomePageLoaded(), "Verify if home page is displayed");
|
||||
AddNewCardPage addNewCardPage = homePage.downloadCard();
|
||||
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isIssuerDescriptionEsignetDisplayed(), "Verify if issuer description esignet displayed");
|
||||
assertTrue(addNewCardPage.isIssuerSearchBarDisplayed(), "Verify if issuer search bar displayed");
|
||||
// addNewCardPage.sendTextInIssuerSearchBar("Download MOSIP Credentials");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageLoaded(), "Verify if add new card page is displayed");
|
||||
assertTrue(addNewCardPage.isAddNewCardPageGuideMessageForEsignetDisplayed(), "Verify if add new card guide message displayed");
|
||||
assertTrue(addNewCardPage.isDownloadViaEsignetDisplayed(), "Verify if download via uin displayed");
|
||||
|
||||
MockCertifyLoginPage mockCertifyLoginPage = new MockCertifyLoginPage(driver);
|
||||
addNewCardPage.clickOnDownloadViaMock();
|
||||
|
||||
addNewCardPage.clickOnContinueButtonInSigninPopupIos();
|
||||
EsignetLoginPage esignetLoginPage = new EsignetLoginPage(driver);
|
||||
esignetLoginPage.clickOnEsignetLoginWithOtpButton();
|
||||
|
||||
Thread.sleep(9000);
|
||||
OtpVerificationPage otpVerification = mockCertifyLoginPage.setEnterIdTextBox(TestDataReader.readData("Mock"));
|
||||
|
||||
mockCertifyLoginPage.clickOnGetOtpButton();
|
||||
// assertTrue(mockCertifyLoginPage.isOtpHasSendMessageDisplayed(),"verify if otp page is displayed");
|
||||
|
||||
otpVerification.enterOtpForEsignet(BaseTestCase.getOtp(), Target.IOS);
|
||||
mockCertifyLoginPage.clickOnVerifyButtonIos();
|
||||
|
||||
assertTrue(homePage.isCredentialTypeValueDisplayed(), "Verify if credential type value is displayed");
|
||||
HistoryPage historyPage = homePage.clickOnHistoryButton();
|
||||
|
||||
assertTrue(historyPage.isHistoryPageLoaded(), "Verify if history page is displayed");
|
||||
assertTrue(historyPage.verifyHistoryForMock(Target.IOS));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user