-
Notifications
You must be signed in to change notification settings - Fork 85
MOSIP-44176:ARC - Run the ARC UI automation in Arab language #670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
a0bfe00
08a28ea
721b9fc
3a12146
59b0551
13a5216
d491e34
0ab2c46
e8fc791
33c2c6d
59533f0
226ead9
16859d2
6f6439c
62556f7
b1e9686
ffba7b1
9448a75
c23865d
1724c69
6ca07a5
a6a0116
ceb9e9e
e84a07b
93665c5
c559239
b12ffc9
748c6dd
56542a7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -160,6 +160,7 @@ public void adultBiometricCorrection() throws InterruptedException { | |||||
| // Navigate to mocksbi page | ||||||
| MockSBIPage mockSBIPage = new MockSBIPage(driver); | ||||||
| mockSBIPage.switchToMockSBI(); | ||||||
| mockSBIPage.clickOnMockSbiSettingsButton(); | ||||||
| mockSBIPage.setAllModalityLowScore(); | ||||||
| mockSBIPage.switchBackToArcApp(); | ||||||
|
|
||||||
|
|
@@ -437,6 +438,7 @@ public void adultBiometricCorrection() throws InterruptedException { | |||||
| assertTrue(previewPage.isNewRegistrationTitleDisplayed(), "Verify if new Registration title is displayed"); | ||||||
| // assertTrue(previewPage.isApplicationIDPreviewPagePageDisplayed(), | ||||||
| // "Verify if application ID In PreviewPage is displayed"); | ||||||
|
|
||||||
| assertTrue(previewPage.isDemographicInformationInPreviewPageDisplayed(), | ||||||
| "Verify if Demographic Information In PreviewPage is displayed"); | ||||||
| assertTrue(previewPage.isDocumentsInformationInPreviewPageDisplayed(), | ||||||
|
|
@@ -993,6 +995,7 @@ public void minorBiometricCorrection() throws InterruptedException { | |||||
| // Navigate to mocksbi page | ||||||
| MockSBIPage mockSBIPage = new MockSBIPage(driver); | ||||||
| mockSBIPage.switchToMockSBI(); | ||||||
| mockSBIPage.clickOnMockSbiSettingsButton(); | ||||||
| mockSBIPage.setAllModalityLowScore(); | ||||||
| mockSBIPage.switchBackToArcApp(); | ||||||
|
|
||||||
|
|
@@ -1247,6 +1250,7 @@ public void minorBiometricCorrection() throws InterruptedException { | |||||
| "Verify if biometric details page is displayed"); | ||||||
| // Return to mocksbi page | ||||||
| mockSBIPage.switchToMockSBI(); | ||||||
| mockSBIPage.clickOnMockSbiSettingsButton(); | ||||||
| mockSBIPage.setAllModalityHighScore(); | ||||||
| mockSBIPage.switchBackToArcApp(); | ||||||
|
|
||||||
|
|
@@ -1504,7 +1508,7 @@ public void minorBiometricCorrection() throws InterruptedException { | |||||
|
|
||||||
| // Biometric correction packet process | ||||||
| // Reset biometric capabilities back to individual biometrics for correction flow | ||||||
| FetchUiSpec.getBiometricDetails("individualBiometrics"); | ||||||
|
|
||||||
| assertTrue(registrationTasksPage.isOperationalTaskDisplayed(), "Verify if operation tasks page is loaded"); | ||||||
|
|
||||||
| registrationTasksPage.clickOnRegistrationTasksTab(); | ||||||
|
|
@@ -1838,6 +1842,26 @@ public void minorBiometricCorrection() throws InterruptedException { | |||||
| break; | ||||||
| } | ||||||
| manageApplicationsPage.clickOnBackButton(); | ||||||
| registrationTasksPage.clickProfileButton(); | ||||||
|
|
||||||
| if ("eng".equalsIgnoreCase(language)) { | ||||||
| profilePage = new ProfilePageEnglish(driver); | ||||||
| } else if ("hin".equalsIgnoreCase(language)) { | ||||||
| profilePage = new ProfilePageHindi(driver); | ||||||
| } else if ("fra".equalsIgnoreCase(language)) { | ||||||
| profilePage = new ProfilePageFrench(driver); | ||||||
| } else if ("kan".equalsIgnoreCase(language)) { | ||||||
| profilePage = new ProfilePageKannada(driver); | ||||||
| } else if ("tam".equalsIgnoreCase(language)) { | ||||||
| profilePage = new ProfilePageTamil(driver); | ||||||
| } else if ("ara".equalsIgnoreCase(language)) { | ||||||
| profilePage = new ProfilePageArabic(driver); | ||||||
| } else { | ||||||
| throw new IllegalStateException("Unsupported language in testdata.json: " + language); | ||||||
| } | ||||||
| profilePage.clickOnLogoutButton(); | ||||||
| assertTrue(loginPage.isLoginPageLoaded(), "verify if login page is displayeded in Selected language"); | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Typo in assertion message: "displayeded" → "displayed". - assertTrue(loginPage.isLoginPageLoaded(), "verify if login page is displayeded in Selected language");
+ assertTrue(loginPage.isLoginPageLoaded(), "verify if login page is displayed in selected language");📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
|
|
||||||
|
|
||||||
| } | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -123,7 +123,6 @@ | |||||||||
| import regclient.pages.tamil.RegistrationTasksPageTamil; | ||||||||||
| import regclient.pages.tamil.SelectLanguagePageTamil; | ||||||||||
| import regclient.utils.TestDataReader; | ||||||||||
| import io.appium.java_client.android.AndroidDriver; | ||||||||||
|
|
||||||||||
| public class NewRegistrationAdult extends AndroidBaseTest { | ||||||||||
|
|
||||||||||
|
|
@@ -432,9 +431,9 @@ public void newRegistrationAdult() throws InterruptedException { | |||||||||
| "Verify if Demographic Information In PreviewPage is displayed"); | ||||||||||
| assertTrue(previewPage.isDocumentsInformationInPreviewPageDisplayed(), | ||||||||||
| "Verify if Documents Information In PreviewPage is displayed"); | ||||||||||
| // assertTrue(previewPage.isBiometricsInformationInPreviewPagePageDisplayed(),"Verify if Biometrics Information In PreviewPage is displayed"); | ||||||||||
| assertTrue(previewPage.isBiometricsInformationInPreviewPagePageDisplayed(), | ||||||||||
| "Verify if Biometrics Information In PreviewPage is displayed"); | ||||||||||
| String Aid = previewPage.getAID(); | ||||||||||
| previewPage.clickOnContinueButton(); | ||||||||||
| if ("eng".equalsIgnoreCase(language)) { | ||||||||||
| authenticationPage = new AuthenticationPageEnglish(driver); | ||||||||||
| } else if ("hin".equalsIgnoreCase(language)) { | ||||||||||
|
|
@@ -450,8 +449,20 @@ public void newRegistrationAdult() throws InterruptedException { | |||||||||
| } else { | ||||||||||
| throw new IllegalStateException("Unsupported language in testdata.json: " + language); | ||||||||||
| } | ||||||||||
| assertTrue(authenticationPage.isAuthenticationPageDisplayed(), | ||||||||||
| "Verify if authentication details page is displayed"); | ||||||||||
|
|
||||||||||
| boolean isAuthenticationPageDisplayed = false; | ||||||||||
|
|
||||||||||
| for (int i = 0; i < 3; i++) { | ||||||||||
| previewPage.clickOnContinueButton(); | ||||||||||
|
|
||||||||||
| if (authenticationPage.isAuthenticationPageDisplayed()) { | ||||||||||
| isAuthenticationPageDisplayed = true; | ||||||||||
| break; | ||||||||||
| } | ||||||||||
| } | ||||||||||
|
|
||||||||||
| assertTrue(isAuthenticationPageDisplayed, "Authentication page not displayed after retries"); | ||||||||||
|
|
||||||||||
| authenticationPage.enterUserName(KeycloakUserManager.moduleSpecificUser); | ||||||||||
| authenticationPage.enterPassword(ArcConfigManager.getIAMUsersPassword()); | ||||||||||
| authenticationPage.clickOnAuthenticatenButton(); | ||||||||||
|
|
@@ -531,20 +542,18 @@ public void newRegistrationAdult() throws InterruptedException { | |||||||||
| "Verify if authenticate button is enable after selecting packet"); | ||||||||||
|
|
||||||||||
| boolean isPageDisplayed = false; | ||||||||||
|
|
||||||||||
| for (int i = 0; i < 3; i++) { | ||||||||||
| pendingApproval.clickOnAuthenticateButton(); | ||||||||||
| Thread.sleep(2000); | ||||||||||
|
|
||||||||||
| if (pendingApproval.isSupervisorAuthenticationTitleDisplayed()) { | ||||||||||
| isPageDisplayed = true; | ||||||||||
| break; | ||||||||||
| } | ||||||||||
| } | ||||||||||
|
|
||||||||||
| assertTrue(isPageDisplayed, "Supervisor Authentication page not displayed after retries"); | ||||||||||
|
|
||||||||||
| pendingApproval.clickOnSubmitButton(); | ||||||||||
| assertTrue(pendingApproval.isSubmitButtonEnabledWithEmptyUsername(), | ||||||||||
| "Verify if error empty username submit button enabled"); | ||||||||||
|
|
||||||||||
| pendingApproval.enterUserName(KeycloakUserManager.moduleSpecificUser + "123"); | ||||||||||
|
|
||||||||||
| assertTrue(pendingApproval.isInvalidUsernameMessageDisplayed(), | ||||||||||
|
|
@@ -585,17 +594,41 @@ public void newRegistrationAdult() throws InterruptedException { | |||||||||
|
|
||||||||||
| assertTrue(manageApplicationsPage.isPacketApproved(Aid), "Verify if Filtre packet is approved "); | ||||||||||
| manageApplicationsPage.clickOnSearchCheckBox(); | ||||||||||
|
|
||||||||||
| for (int i = 0; i < 3; i++) { | ||||||||||
| manageApplicationsPage.clickOnUploadButton(); | ||||||||||
| Thread.sleep(2000); | ||||||||||
| if (!manageApplicationsPage.isNoNetworkFoundDisplayed()) | ||||||||||
|
|
||||||||||
| if (!manageApplicationsPage.isNoNetworkFoundDisplayed()) { | ||||||||||
| break; | ||||||||||
| } | ||||||||||
| } | ||||||||||
|
Comment on lines
598
to
604
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a post-retry assertion so upload failures don’t pass silently. ✅ Suggested guard (apply to both loops)- for (int i = 0; i < 3; i++) {
- manageApplicationsPage.clickOnUploadButton();
-
- if (!manageApplicationsPage.isNoNetworkFoundDisplayed()) {
- break;
- }
- }
+ boolean uploadSucceeded = false;
+ for (int i = 0; i < 3; i++) {
+ manageApplicationsPage.clickOnUploadButton();
+ if (!manageApplicationsPage.isNoNetworkFoundDisplayed()) {
+ uploadSucceeded = true;
+ break;
+ }
+ }
+ assertTrue(uploadSucceeded, "Upload failed after retries (No Network Found)");Also applies to: 1323-1329 🤖 Prompt for AI Agents |
||||||||||
|
|
||||||||||
| manageApplicationsPage.clickOnBackButton(); | ||||||||||
|
|
||||||||||
| registrationTasksPage.clickProfileButton(); | ||||||||||
|
|
||||||||||
| if ("eng".equalsIgnoreCase(language)) { | ||||||||||
| profilePage = new ProfilePageEnglish(driver); | ||||||||||
| } else if ("hin".equalsIgnoreCase(language)) { | ||||||||||
| profilePage = new ProfilePageHindi(driver); | ||||||||||
| } else if ("fra".equalsIgnoreCase(language)) { | ||||||||||
| profilePage = new ProfilePageFrench(driver); | ||||||||||
| } else if ("kan".equalsIgnoreCase(language)) { | ||||||||||
| profilePage = new ProfilePageKannada(driver); | ||||||||||
| } else if ("tam".equalsIgnoreCase(language)) { | ||||||||||
| profilePage = new ProfilePageTamil(driver); | ||||||||||
| } else if ("ara".equalsIgnoreCase(language)) { | ||||||||||
| profilePage = new ProfilePageArabic(driver); | ||||||||||
| } else { | ||||||||||
| throw new IllegalStateException("Unsupported language in testdata.json: " + language); | ||||||||||
| } | ||||||||||
|
|
||||||||||
| profilePage.clickOnLogoutButton(); | ||||||||||
| assertTrue(loginPage.isLoginPageLoaded(), "verify if login page is displayeded in Selected language"); | ||||||||||
|
|
||||||||||
| } | ||||||||||
|
|
||||||||||
| @Test(priority = 1, description = "Verify adult new registration") | ||||||||||
| // @Test(priority = 1, description = "Verify adult new registration") | ||||||||||
| public void newRegistrationAdultUploadMultipleDoccuments() throws InterruptedException { | ||||||||||
|
Comment on lines
+631
to
632
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The test is now disabled—please confirm intent. 🔧 Suggested fix (re-enable test)-// `@Test`(priority = 1, description = "Verify adult new registration")
+@Test(priority = 1, description = "Verify adult new registration")📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||
| BasePage.disableAutoRotation(); | ||||||||||
| FetchUiSpec.getUiSpec("newProcess"); | ||||||||||
|
|
@@ -1144,7 +1177,7 @@ public void newRegistrationAdultUploadMultipleDoccuments() throws InterruptedExc | |||||||||
| "Verify if Biometrics Information In PreviewPage is displayed"); | ||||||||||
|
|
||||||||||
| String Aid = previewPage.getAID(); | ||||||||||
| previewPage.clickOnContinueButton(); | ||||||||||
|
|
||||||||||
| if ("eng".equalsIgnoreCase(language)) { | ||||||||||
| authenticationPage = new AuthenticationPageEnglish(driver); | ||||||||||
| } else if ("hin".equalsIgnoreCase(language)) { | ||||||||||
|
|
@@ -1160,8 +1193,19 @@ public void newRegistrationAdultUploadMultipleDoccuments() throws InterruptedExc | |||||||||
| } else { | ||||||||||
| throw new IllegalStateException("Unsupported language in testdata.json: " + language); | ||||||||||
| } | ||||||||||
| assertTrue(authenticationPage.isAuthenticationPageDisplayed(), | ||||||||||
| "Verify if authentication details page is displayed"); | ||||||||||
|
|
||||||||||
| boolean isAuthenticationPageDisplayed = false; | ||||||||||
|
|
||||||||||
| for (int i = 0; i < 3; i++) { | ||||||||||
| previewPage.clickOnContinueButton(); | ||||||||||
|
|
||||||||||
| if (authenticationPage.isAuthenticationPageDisplayed()) { | ||||||||||
| isAuthenticationPageDisplayed = true; | ||||||||||
| break; | ||||||||||
| } | ||||||||||
| } | ||||||||||
|
|
||||||||||
| assertTrue(isAuthenticationPageDisplayed, "Authentication page not displayed after retries"); | ||||||||||
|
|
||||||||||
| authenticationPage.enterUserName(KeycloakUserManager.moduleSpecificUser); | ||||||||||
| authenticationPage.enterPassword(ArcConfigManager.getIAMUsersPassword()); | ||||||||||
|
|
@@ -1236,18 +1280,17 @@ public void newRegistrationAdultUploadMultipleDoccuments() throws InterruptedExc | |||||||||
| "Verify if authenticate button is enable after selecting packet"); | ||||||||||
|
|
||||||||||
| boolean isPageDisplayed = false; | ||||||||||
|
|
||||||||||
| for (int i = 0; i < 3; i++) { | ||||||||||
| pendingApproval.clickOnAuthenticateButton(); | ||||||||||
| Thread.sleep(2000); | ||||||||||
|
|
||||||||||
| if (pendingApproval.isSupervisorAuthenticationTitleDisplayed()) { | ||||||||||
| isPageDisplayed = true; | ||||||||||
| break; | ||||||||||
| } | ||||||||||
| } | ||||||||||
| assertTrue(isPageDisplayed, "Supervisor Authentication page not displayed after retries"); | ||||||||||
|
|
||||||||||
| assertTrue(pendingApproval.isSupervisorAuthenticationTitleDisplayed(), | ||||||||||
| "Verify if error empty username submit button enabled"); | ||||||||||
| assertTrue(isPageDisplayed, "Supervisor Authentication page not displayed after retries"); | ||||||||||
|
|
||||||||||
| pendingApproval.enterUserName(KeycloakUserManager.moduleSpecificUser); | ||||||||||
| pendingApproval.enterPassword(ArcConfigManager.getIAMUsersPassword()); | ||||||||||
|
|
@@ -1277,7 +1320,35 @@ public void newRegistrationAdultUploadMultipleDoccuments() throws InterruptedExc | |||||||||
|
|
||||||||||
| assertTrue(manageApplicationsPage.isSearchAIDDisplayed(Aid), "Verify if Search Aid should displayed"); | ||||||||||
| manageApplicationsPage.clickOnSearchCheckBox(); | ||||||||||
| manageApplicationsPage.clickOnUploadButton(); | ||||||||||
| for (int i = 0; i < 3; i++) { | ||||||||||
| manageApplicationsPage.clickOnUploadButton(); | ||||||||||
|
|
||||||||||
| if (!manageApplicationsPage.isNoNetworkFoundDisplayed()) { | ||||||||||
| break; | ||||||||||
| } | ||||||||||
| } | ||||||||||
|
|
||||||||||
| manageApplicationsPage.clickOnBackButton(); | ||||||||||
|
|
||||||||||
| registrationTasksPage.clickProfileButton(); | ||||||||||
|
|
||||||||||
| if ("eng".equalsIgnoreCase(language)) { | ||||||||||
| profilePage = new ProfilePageEnglish(driver); | ||||||||||
| } else if ("hin".equalsIgnoreCase(language)) { | ||||||||||
| profilePage = new ProfilePageHindi(driver); | ||||||||||
| } else if ("fra".equalsIgnoreCase(language)) { | ||||||||||
| profilePage = new ProfilePageFrench(driver); | ||||||||||
| } else if ("kan".equalsIgnoreCase(language)) { | ||||||||||
| profilePage = new ProfilePageKannada(driver); | ||||||||||
| } else if ("tam".equalsIgnoreCase(language)) { | ||||||||||
| profilePage = new ProfilePageTamil(driver); | ||||||||||
| } else if ("ara".equalsIgnoreCase(language)) { | ||||||||||
| profilePage = new ProfilePageArabic(driver); | ||||||||||
| } else { | ||||||||||
| throw new IllegalStateException("Unsupported language in testdata.json: " + language); | ||||||||||
| } | ||||||||||
| profilePage.clickOnLogoutButton(); | ||||||||||
| assertTrue(loginPage.isLoginPageLoaded(), "verify if login page is displayeded in Selected language"); | ||||||||||
|
|
||||||||||
| } | ||||||||||
|
|
||||||||||
|
|
||||||||||
Uh oh!
There was an error while loading. Please reload this page.