Skip to content

Commit

Permalink
Synced UI automation tests for release 0.12.0 (#1416)
Browse files Browse the repository at this point in the history
* MOSIP-32580 added new test cases for android (#1396)

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflict

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflict

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* incorprated changes

Signed-off-by: Anup Nehe <[email protected]>

* INJIMOB-924 MOSIP-31927

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31874

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conlifcts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* updating to unblock deveops

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32267 MOSIP-32204

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32204

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32580

Signed-off-by: Anup Nehe <[email protected]>

---------

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32641  stabilization of ios and addtion of new testcases.  (#1400)

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflict

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflict

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* incorprated changes

Signed-off-by: Anup Nehe <[email protected]>

* INJIMOB-924 MOSIP-31927

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31874

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conlifcts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* updating to unblock deveops

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32267 MOSIP-32204

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32204

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32580

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32580 MOSIP-32641

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

---------

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32580 automated new ios testcases (#1409)

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflict

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflict

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* incorprated changes

Signed-off-by: Anup Nehe <[email protected]>

* INJIMOB-924 MOSIP-31927

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31874

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conlifcts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* updating to unblock deveops

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32267 MOSIP-32204

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32204

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32580

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32580 MOSIP-32641

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32580

Signed-off-by: Anup Nehe <[email protected]>

---------

Signed-off-by: Anup Nehe <[email protected]>

* moved changes from develop to qa-develop

Signed-off-by: kamalsingh <[email protected]>

* MOSIP-32580 added new test cases for android (#1396)

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflict

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflict

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* incorprated changes

Signed-off-by: Anup Nehe <[email protected]>

* INJIMOB-924 MOSIP-31927

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31874

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conlifcts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* updating to unblock deveops

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32267 MOSIP-32204

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32204

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32580

Signed-off-by: Anup Nehe <[email protected]>

---------

Signed-off-by: Anup Nehe <[email protected]>
Signed-off-by: kamalsingh <[email protected]>

* MOSIP-32641  stabilization of ios and addtion of new testcases.  (#1400)

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflict

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflict

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* incorprated changes

Signed-off-by: Anup Nehe <[email protected]>

* INJIMOB-924 MOSIP-31927

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31874

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conlifcts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* updating to unblock deveops

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32267 MOSIP-32204

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32204

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32580

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32580 MOSIP-32641

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

---------

Signed-off-by: Anup Nehe <[email protected]>
Signed-off-by: kamalsingh <[email protected]>

* MOSIP-32580 automated new ios testcases (#1409)

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflict

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflict

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* incorprated changes

Signed-off-by: Anup Nehe <[email protected]>

* INJIMOB-924 MOSIP-31927

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31874

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-31384

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conlifcts

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* updating to unblock deveops

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32267 MOSIP-32204

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32204

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32580

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32580 MOSIP-32641

Signed-off-by: Anup Nehe <[email protected]>

* resolve conflicts

Signed-off-by: Anup Nehe <[email protected]>

* MOSIP-32580

Signed-off-by: Anup Nehe <[email protected]>

---------

Signed-off-by: Anup Nehe <[email protected]>

---------

Signed-off-by: Anup Nehe <[email protected]>
Signed-off-by: kamalsingh <[email protected]>
Co-authored-by: anup-nehe <[email protected]>
  • Loading branch information
kamalsinghthoughtworks and anup-nehe authored May 6, 2024
1 parent bfc5253 commit 1456a4a
Show file tree
Hide file tree
Showing 49 changed files with 2,597 additions and 382 deletions.
15 changes: 14 additions & 1 deletion injitest/androidRegression.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<include name="noPreDownloadedVCAndNoHistoryInFreshInstallation"/>
<include name="verifyInvalidOtpMessage"/>
<include name="activateVcFromDetailedViewPage"/>
<include name="verifyActiveVcAndWaitForOtpTimeOut"/>
<include name="downloadAndActiveVcUsingUinViaEsignet"/>
</methods>
</class>
<class name="androidTestCases.ChangeLanguageTest">
Expand All @@ -41,12 +43,15 @@
<include name="deleteVcAndVerifyInHistory"/>
<include name="cancelDeleteVc"/>
<include name="DownloadingDeletedVc"/>
<include name="deleteVcAndVerifyInHistoryForEsignet"/>
<include name="deleteVcAndVerifyInHistoryForSunbird"/>
</methods>
</class>
<class name="androidTestCases.GenerateUinOrVidTest">
<methods>
<include name="generateUinOrVidUsingAid"/>
<include name="goBackToGenerateUinOrVidUsingAidFromOtpVerificationPage"/>
<include name="generateUinOrVidUsingInvalidAid"/>
</methods>
</class>
<class name="androidTestCases.NoNetworkAndroidTest">
Expand All @@ -67,6 +72,7 @@
<include name="downloadVcInOtherLanguageViaEsignetWithoutInternet"/>
<include name="changeLanguageToTamilWithoutNetwork"/>
<include name="verifyVcIssuerListWithoutNetwork"/>
<include name="VerifyGenerateUinOrVidUsingAidHeader"/>
</methods>
</class>
<class name="androidTestCases.PinVcTest">
Expand All @@ -75,6 +81,9 @@
<include name="VerifyCameraOpenAfterPinVc"/>
<include name="downloadVcViaEsignetAndPinUnpin"/>
<include name="verifyMessageAfterDenyBluetoothPopup"/>
<include name="pinVcInDetailedVcView"/>
<include name="pinEsignetVcMultipleTimes"/>
<include name="pinMosipVcMultipleTimes"/>
</methods>
</class>
<class name="androidTestCases.ReceiveCardTest">
Expand Down Expand Up @@ -114,6 +123,9 @@
<methods>
<include name="downloadAndVerifyVcUsingUinViaEsignet"/>
<include name="downloadAndVerifyVcUsingVidViaEsignet"/>
<include name="downloadMultipleVcViaEsignet"/>
<include name="downloadMultipleCardsAndVerifySearch"/>
<include name="downloadCardsAndVerifySearch"/>
</methods>
</class>
<class name="androidTestCases.VcDownloadAndVerifyUsingSunbirdTest">
Expand Down Expand Up @@ -153,7 +165,8 @@
<include name="verifyActivationFailedRecordInHistoryFromDetailedView"/>
<include name="activateVcAndVerifyInHistory"/>
<include name="downloadAndVerifyHistoryUsingUinViaEsignet"/>
<include name="downloadAndVerifyHistoryUsingVidViaEsignet"/>
<include name="downloadAndVerifyHistoryForSunbird"/>
<include name="downloadVcAndVerifyHistoryFromMoreOptions"/>
</methods>
</class>
<class name="androidTestCases.VerifyWelcomePagesTest">
Expand Down
17 changes: 17 additions & 0 deletions injitest/iosRegression.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<include name="noPreDownloadedVCAndNoHistoryInFreshInstallation"/>
<include name="verifyInvalidOtpMessage"/>
<include name="activateVcFromDetailedViewPage"/>
<include name="verifyActiveVcAndWaitForOtpTimeOut"/>
<include name="downloadAndActiveVcUsingUinViaEsignet"/>
</methods>
</class>
<class name="iosTestCases.ChangeLanguageTest">
Expand All @@ -42,12 +44,15 @@
<include name="deleteVcAndVerifyInHistory"/>
<include name="cancelDeleteVc"/>
<include name="DownloadingDeletedVc"/>
<include name="deleteVcAndVerifyInHistoryForEsignet"/>
<include name="deleteVcAndVerifyInHistoryForSunbird"/>
</methods>
</class>
<class name="iosTestCases.GenerateUinOrVidTest">
<methods>
<include name="generateUinOrVidUsingAid"/>
<include name="goBackToGenerateUinOrVidUsingAidFromOtpVerificationPage"/>
<include name="generateUinOrVidUsingInvalidAid"/>
</methods>
</class>
<class name="iosTestCases.PinVcTest">
Expand All @@ -56,6 +61,9 @@
<include name="VerifyCameraOpenAfterPinVc"/>
<include name="downloadVcViaEsignetAndPinUnpin"/>
<include name="verifyMessageAfterDenyBluetoothPopup"/>
<include name="pinEsignetVcMultipleTimes"/>
<include name="pinMosipVcMultipleTimes"/>
<include name="pinVcInDetailedVcView"/>
</methods>
</class>
<class name="iosTestCases.ShareVcTest">
Expand All @@ -76,6 +84,9 @@
<include name="verifyRecivedCardOffline"/>
<include name="downloadCardWithoutInternetRetryWithInternet"/>
<include name="verifyVcIssuerListWithoutNetwork"/>
<include name="DownloadVcWithUinWithoutNetwork"/>
<include name="DownloadVcWithEsignetWithoutNetwork"/>
<include name="verifyGetUinHeaderOffline"/>
</methods>
</class>
<class name="iosTestCases.UnlockWithPasscodeTest">
Expand All @@ -89,6 +100,8 @@
<include name="downloadAndVerifyVcUsingUinViaEsignet"/>
<include name="downloadAndVerifyVcUsingVidViaEsignet"/>
<include name="denyPopupforEsignetLoginWebPage"/>
<include name="downloadMultipleVcViaEsignet"/>

</methods>
</class>
<class name="iosTestCases.VcDownloadAndVerifyUsingSunbirdTest">
Expand All @@ -104,6 +117,8 @@
<include name="generateMultipleVcWithSameUin"/>
<include name="verifyInvalidUinErrorMessage"/>
<include name="verifyOtpTimeOutAndGoBack"/>
<include name="downloadMultipleCardsAndVerifySearch"/>
<include name="downloadCardsAndVerifySearch"/>
</methods>
</class>
<class name="iosTestCases.VcDownloadAndVerifyUsingVidTest">
Expand All @@ -127,6 +142,8 @@
<include name="activateVcAndVerifyInHistory"/>
<include name="downloadAndVerifyHistoryUsingUinViaEsignet"/>
<include name="downloadAndVerifyHistoryUsingVidViaEsignet"/>
<include name="downloadAndVerifyHistoryForSunbird"/>
<include name="downloadVcAndVerifyActivityLog"/>
</methods>
</class>
<class name="iosTestCases.VerifyWelcomePagesTest">
Expand Down
2 changes: 1 addition & 1 deletion injitest/iosSanity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@
</class>
</classes>
</test>
</suite>
</suite>
7 changes: 7 additions & 0 deletions injitest/src/main/java/inji/pages/AddNewCardPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public class AddNewCardPage extends BasePage{
@AndroidFindBy(accessibility = "issuerHeading-Sunbird")
@iOSXCUITFindBy(accessibility = "issuerHeading-Sunbird")
private WebElement downloadViaSunbird;

@AndroidFindBy(accessibility = "credentialTypeHeading-InsuranceCredential")
@iOSXCUITFindBy(accessibility = "credentialTypeHeading-InsuranceCredential")
private WebElement credentialTypeHeadingInsuranceCredential;

public AddNewCardPage(AppiumDriver driver) {
super(driver);
Expand Down Expand Up @@ -153,5 +157,8 @@ public SunbirdLoginPage clickOnDownloadViaSunbird(){
clickOnElement(downloadViaSunbird);
return new SunbirdLoginPage(driver);
}
public void clickOnInsuranceCredential(){
clickOnElement(credentialTypeHeadingInsuranceCredential);
}
}

25 changes: 25 additions & 0 deletions injitest/src/main/java/inji/pages/AppUnlockMethodPage.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ public class AppUnlockMethodPage extends BasePage {
@iOSXCUITFindBy(accessibility = "usePasscode")
private WebElement usePasscodeButton;

@AndroidFindBy(accessibility = "description")
@iOSXCUITFindBy(accessibility = "description")
private WebElement descriptionText;

@AndroidFindBy(accessibility = "passwordTypeDescription")
@iOSXCUITFindBy(accessibility = "passwordTypeDescription")
private WebElement passwordTypeDescriptionText;

@AndroidFindBy(accessibility = "useBiometrics")
@iOSXCUITFindBy(accessibility = "useBiometrics")
private WebElement useBiometricsButton;

public AppUnlockMethodPage(AppiumDriver driver) {
super(driver);
}
Expand All @@ -27,4 +39,17 @@ public SetPasscode clickOnUsePasscode() {
this.clickOnElement(usePasscodeButton);
return new SetPasscode(driver);
}

public String getDescriptionText() {
return this.getTextFromLocator(descriptionText);
}

public String getPasswordTypeDescriptionText() {
return this.getTextFromLocator(passwordTypeDescriptionText);
}

public boolean isUseBiometricsButton() {
return this.isElementDisplayed(useBiometricsButton);
}

}
54 changes: 22 additions & 32 deletions injitest/src/main/java/inji/pages/BackupAndRestorePage.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,24 @@
public class BackupAndRestorePage extends BasePage {

@AndroidFindBy(accessibility = "backupAndRestore")
@iOSXCUITFindBy(accessibility = "backupAndRestore")
private WebElement backupAndRestoreHeader;

@AndroidFindBy(accessibility = "backupProcessInfo")
@iOSXCUITFindBy(accessibility = "backupProcessInfo")
private WebElement backupProcessInfo;

@AndroidFindBy(accessibility = "cloudInfo")
@iOSXCUITFindBy(accessibility = "cloudInfo")
private WebElement cloudInfo;

@AndroidFindBy(accessibility = "googleDriveTitle")
@iOSXCUITFindBy(accessibility = "googleDriveTitle")
private WebElement googleDriveTitle;

@AndroidFindBy(accessibility = "googleDriveIcon")
@iOSXCUITFindBy(accessibility = "googleDriveIcon")
private WebElement googleDriveIcon;

@AndroidFindBy(accessibility = "goBack")
@iOSXCUITFindBy(accessibility = "goBack")
private WebElement goBackButton;

@AndroidFindBy(className = "android.view.View")
@iOSXCUITFindBy(accessibility = "proceed")
private WebElement proceedButton;

@AndroidFindBy(uiAutomator = "new UiSelector().textContains(\"Add another account\")")
Expand All @@ -41,7 +34,7 @@ public class BackupAndRestorePage extends BasePage {
@AndroidFindBy(xpath = "//android.widget.TextView[@resource-id=\"com.google.android.gms:id/main_title\"]")
private WebElement chooseAccountHeader;

@AndroidFindBy(xpath = "//android.widget.EditText[@resource-id=\"identifierId\"]")
@AndroidFindBy(xpath = "//android.widget.EditText")
private WebElement enterEmail;

@AndroidFindBy(uiAutomator = "new UiSelector().textContains(\"Next\")")
Expand All @@ -60,77 +53,62 @@ public class BackupAndRestorePage extends BasePage {
public WebElement agreeButton;

@AndroidFindBy(accessibility = "backup")
@iOSXCUITFindBy(accessibility = "backup")
private WebElement BackupButton;

@AndroidFindBy(accessibility = "restore")
@iOSXCUITFindBy(accessibility = "restore")
private WebElement restoreButton;

@AndroidFindBy(accessibility = "lastBackupTime")
@iOSXCUITFindBy(accessibility = "lastBackupTime")
private WebElement lastBackupTime;

@AndroidFindBy(accessibility = "dataBackupSuccessPopup")
@iOSXCUITFindBy(accessibility = "dataBackupSuccessPopup")
@AndroidFindBy(accessibility = "dataBackupSuccessPopupText")
private WebElement dataBackupSuccessPopup;

@AndroidFindBy(accessibility = "close")
@iOSXCUITFindBy(accessibility = "close")
private WebElement closeButton;

@AndroidFindBy(accessibility = "arrowLeft")
@iOSXCUITFindBy(accessibility = "arrowLeft")
@AndroidFindBy(accessibility = "dataBackupInProgressText")
private WebElement dataBackupInProgressText;

@AndroidFindBy(accessibility = "arrow-left")
private WebElement arrowLeftButton;

@AndroidFindBy(accessibility = "associatedAccountEmail")
@iOSXCUITFindBy(accessibility = "associatedAccountEmail")
private WebElement associatedAccountEmail;

@AndroidFindBy(accessibility = "restoreBackupSuccessPopup")
@iOSXCUITFindBy(accessibility = "restoreBackupSuccessPopup")
@AndroidFindBy(accessibility = "restoreBackupSuccessPopupText")
private WebElement restoreBackupSuccessPopUp;


@AndroidFindBy(accessibility = "CloudBackupConsentDeniedTitle")
@iOSXCUITFindBy(accessibility = "CloudBackupConsentDeniedTitle")
private WebElement permissionDeniedHeader;

@AndroidFindBy(accessibility = "CloudBackupConsentDeniedMessage")
@iOSXCUITFindBy(accessibility = "CloudBackupConsentDeniedMessage")
private WebElement errorMessageDescription;

@AndroidFindBy(accessibility = "errorHelpText")
@iOSXCUITFindBy(accessibility = "errorHelpText")
private WebElement errorHelpText;


@AndroidFindBy(accessibility = "allowAccess")
@iOSXCUITFindBy(accessibility = "allowAccess")
private WebElement allowAccessButton;

@AndroidFindBy(accessibility = "LastBackupSectionHeader")
@iOSXCUITFindBy(accessibility = "LastBackupSectionHeader")
private WebElement lastBackupSectionHeader;

@AndroidFindBy(accessibility = "AccountSectionHeader")
@iOSXCUITFindBy(accessibility = "AccountSectionHeader")
private WebElement AccountSectionHeader;

@AndroidFindBy(accessibility = "storageInfo")
@iOSXCUITFindBy(accessibility = "storageInfo")
private WebElement storageInfo;

@AndroidFindBy(accessibility = "associatedAccount")
@iOSXCUITFindBy(accessibility = "associatedAccount")
@AndroidFindBy(accessibility = "associatedAccountEmail")
private WebElement associatedAccount;

@AndroidFindBy(accessibility = "restoreSectionHeader")
@iOSXCUITFindBy(accessibility = "restoreSectionHeader")
private WebElement restoreSectionHeader;

@AndroidFindBy(accessibility = "restoreFailure-noBackupFilePopup")
@iOSXCUITFindBy(accessibility = "restoreFailure-noBackupFilePopup")
private WebElement restoreFailurePopup;

@AndroidFindBy(accessibility = "restoreInfo")
Expand All @@ -142,6 +120,9 @@ public class BackupAndRestorePage extends BasePage {
@AndroidFindBy(xpath = "//*[@resource-id=\"com.google.android.gms:id/account_display_name\"]")
private WebElement selectAccount;

@AndroidFindBy(accessibility = "restoreBackupSuccessPopupText")
private WebElement restoreBackupSuccessPopupText;


public BackupAndRestorePage(AppiumDriver driver) {
super(driver);
Expand Down Expand Up @@ -306,8 +287,9 @@ public void clickOnHelpButton() {
}

public void clickOnEmailHeader() {
if(isElementDisplayed(selectAccount))
clickOnElement(selectAccount);
if(isElementDisplayed(selectAccount)) {
clickOnElement(selectAccount);
}
}

public boolean isBackupFQADisplayed() throws InterruptedException {
Expand All @@ -316,4 +298,12 @@ public boolean isBackupFQADisplayed() throws InterruptedException {
return context.contains("Why should I take a backup?") && context.contains("What is data backup? ") && context.contains("How to backup to your google account?");
}

public boolean isDataBackupInProgressTextDisplayed() {
return this.isElementDisplayed(dataBackupInProgressText,30);
}

public boolean isDataBackupInProgressTextDisappear() {
return this.isElementDisplayed(dataBackupInProgressText, 10);
}

}
Loading

0 comments on commit 1456a4a

Please sign in to comment.