Skip to content

Commit

Permalink
Merge pull request #747 from jayesh12234/develop
Browse files Browse the repository at this point in the history
MOSIP-34303
  • Loading branch information
lsivanand authored Aug 5, 2024
2 parents cb431a5 + 7f89399 commit aa5cf43
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void getMyUIN() throws Exception {
String otp = MockSMTPListener.getOtp(externalemail);
Commons.enter( driver, By.id("otp-input"), otp);
Commons.click( driver, By.xpath("//button[@id='getUinsubmitBtn']"));
Commons.assertCheck(By.id("dismissBtn"),"verify if Your UIN card has been successfully downloaded against the Event ID");
Commons.assertCheck(By.id("messagePopup"),"verify if Your UIN card has been successfully downloaded against the Event ID");
Commons.click( driver, By.id("dismissBtn"));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public void getPersonalisedCard() throws Exception {
Commons.clickWebelement( driver, By.id("dateOfBirth"));
Commons.clickWebelement( driver, By.id("UIN"));
Commons.click( driver, By.id("downloadFileBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if personalisedcard is downloaded");
Commons.assertCheck(By.id("messagePopup"),"verify if personalisedcard is downloaded");

Commons.click( driver, By.id("dismissBtn"));
Commons.click( driver, By.id("uinservices/personalisedcard"));
Expand All @@ -26,7 +26,7 @@ public void getPersonalisedCard() throws Exception {
Commons.clickWebelement( driver, By.id("perpetualVID"));
Commons.clickWebelement( driver, By.id("phone"));
Commons.click( driver, By.id("downloadFileBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if personalisedcard is downloaded");
Commons.assertCheck(By.id("messagePopup"),"verify if personalisedcard is downloaded");

Commons.click( driver, By.id("dismissBtn"));
Commons.click( driver, By.id("uinservices/personalisedcard"));
Expand All @@ -40,7 +40,7 @@ public void getPersonalisedCard() throws Exception {
Commons.clickWebelement( driver, By.id("gender"));
Commons.clickWebelement( driver, By.id("photo"));
Commons.click( driver, By.id("downloadFileBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if personalisedcard is downloaded");
Commons.assertCheck(By.id("messagePopup"),"verify if personalisedcard is downloaded");

Commons.click( driver, By.id("dismissBtn"));
Commons.click( driver, By.id("uinservices/personalisedcard"));
Expand All @@ -54,7 +54,7 @@ public void getPersonalisedCard() throws Exception {
Commons.clickWebelement( driver, By.id("gender"));
Commons.clickWebelement( driver, By.id("photo"));
Commons.click( driver, By.id("downloadFileBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if personalisedcard is downloaded");
Commons.assertCheck(By.id("messagePopup"),"verify if personalisedcard is downloaded");

Commons.click( driver, By.id("dismissBtn"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,27 @@ public void manageMyVid() throws Exception {
Commons.click( driver, By.id("NoBtn"));
Commons.click( driver, By.id("Temporary"));
Commons.click( driver, By.id("vidWarningBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if Your VID has been successfully created against the Event ID");
Commons.assertCheck(By.id("messagePopup"),"verify if Your VID has been successfully created against the Event ID");
Commons.click( driver, By.id("dismissBtn"));
Commons.click( driver, By.xpath("(//*[@id='download0'])[2]"));
Commons.click( driver, By.id("vidDownloadBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if Your request to download the VID card has been successfully processed");
Commons.assertCheck(By.id("messagePopup"),"verify if Your request to download the VID card has been successfully processed");
Commons.click( driver, By.id("dismissBtn"));
Commons.click( driver, By.xpath("(//*[@id='delete0'])[2]"));
Commons.click( driver, By.id("vidDeleteBtn"));
Commons.assertCheck(By.id("dismissBtn"),"Your VID has been successfully deleted against the Event ID");
Commons.click( driver, By.id("dismissBtn"));
Commons.click( driver, By.id("OneTimeUse"));
Commons.click( driver, By.id("vidWarningBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if Your VID has been successfully created against the Event ID");
Commons.assertCheck(By.id("messagePopup"),"verify if Your VID has been successfully created against the Event ID");
Commons.click( driver, By.id("dismissBtn"));
Commons.click( driver, By.xpath("(//*[@id='download0'])[2]"));
Commons.click( driver, By.id("vidDownloadBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if Your request to download the VID card has been successfully processed");
Commons.assertCheck(By.id("messagePopup"),"verify if Your request to download the VID card has been successfully processed");
Commons.click( driver, By.id("dismissBtn"));
Commons.click( driver, By.xpath("(//*[@id='delete0'])[2]"));
Commons.click( driver, By.id("vidDeleteBtn"));
Commons.assertCheck(By.id("dismissBtn"),"Your VID has been successfully deleted against the Event ID");
Commons.assertCheck(By.id("messagePopup"),"Your VID has been successfully deleted against the Event ID");
Commons.click( driver, By.id("dismissBtn"));

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,70 +17,70 @@ public void secureMyId() throws Exception {
Commons.click( driver, By.id("setAuthlockStatus1"));
Commons.click( driver, By.id("updateAuthlockStatusBtn"));
Commons.click( driver, By.id("lockunlockauthBtn"));
Commons.assertCheck(By.id("dismissBtn"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.assertCheck(By.id("messagePopup"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.click( driver, By.id("dismissBtn"));

Commons.click( driver, By.id("uinservices/lockunlockauth"));
Commons.click( driver, By.id("setAuthlockStatus1"));
Commons.click( driver, By.id("updateAuthlockStatusBtn"));
Commons.click( driver, By.id("lockunlockauthBtn"));
Commons.assertCheck(By.id("dismissBtn"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.assertCheck(By.id("messagePopup"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.click( driver, By.id("dismissBtn"));

Commons.click( driver, By.id("uinservices/lockunlockauth"));
Commons.click( driver, By.id("setAuthlockStatus2"));
Commons.click( driver, By.id("updateAuthlockStatusBtn"));
Commons.click( driver, By.id("lockunlockauthBtn"));
Commons.assertCheck(By.id("dismissBtn"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.assertCheck(By.id("messagePopup"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.click( driver, By.id("dismissBtn"));

Commons.click( driver, By.id("uinservices/lockunlockauth"));
Commons.click( driver, By.id("setAuthlockStatus2"));
Commons.click( driver, By.id("updateAuthlockStatusBtn"));
Commons.click( driver, By.id("lockunlockauthBtn"));
Commons.assertCheck(By.id("dismissBtn"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.assertCheck(By.id("messagePopup"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.click( driver, By.id("dismissBtn"));

Commons.click( driver, By.id("uinservices/lockunlockauth"));
Commons.click( driver, By.id("setAuthlockStatus3"));
Commons.click( driver, By.id("updateAuthlockStatusBtn"));
Commons.click( driver, By.id("lockunlockauthBtn"));
Commons.assertCheck(By.id("dismissBtn"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.assertCheck(By.id("messagePopup"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.click( driver, By.id("dismissBtn"));

Commons.click( driver, By.id("uinservices/lockunlockauth"));
Commons.click( driver, By.id("setAuthlockStatus3"));
Commons.click( driver, By.id("updateAuthlockStatusBtn"));
Commons.click( driver, By.id("lockunlockauthBtn"));
Commons.assertCheck(By.id("dismissBtn"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.assertCheck(By.id("messagePopup"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.click( driver, By.id("dismissBtn"));

Commons.click( driver, By.id("uinservices/lockunlockauth"));
Commons.click( driver, By.id("setAuthlockStatus4"));
Commons.click( driver, By.id("updateAuthlockStatusBtn"));
Commons.click( driver, By.id("lockunlockauthBtn"));
Commons.assertCheck(By.id("dismissBtn"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.assertCheck(By.id("messagePopup"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.click( driver, By.id("dismissBtn"));

Commons.click( driver, By.id("uinservices/lockunlockauth"));
Commons.click( driver, By.id("setAuthlockStatus4"));
Commons.click( driver, By.id("updateAuthlockStatusBtn"));
Commons.click( driver, By.id("lockunlockauthBtn"));
Commons.assertCheck(By.id("dismissBtn"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.assertCheck(By.id("messagePopup"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.click( driver, By.id("dismissBtn"));

Commons.click( driver, By.id("uinservices/lockunlockauth"));
Commons.click( driver, By.id("setAuthlockStatus5"));
Commons.click( driver, By.id("updateAuthlockStatusBtn"));
Commons.click( driver, By.id("lockunlockauthBtn"));
Commons.assertCheck(By.id("dismissBtn"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.assertCheck(By.id("messagePopup"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.click( driver, By.id("dismissBtn"));

Commons.click( driver, By.id("uinservices/lockunlockauth"));
Commons.click( driver, By.id("setAuthlockStatus5"));
Commons.click( driver, By.id("updateAuthlockStatusBtn"));
Commons.click( driver, By.id("lockunlockauthBtn"));
Commons.assertCheck(By.id("dismissBtn"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.assertCheck(By.id("messagePopup"),"Your request to change the Authentication type(s) has been saved successfully against the Event ID");
Commons.click( driver, By.id("dismissBtn"));

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void shareMyData() throws Exception {
Commons.clickWebelement( driver, By.id("shareBtn"));
Commons.clickWebelement( driver, By.id("confirmShareInfo"));
Commons.clickWebelement( driver, By.id("shareInfoBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if The data chosen by you has been successfully shared with the chosen partner against the Event Id");
Commons.assertCheck(By.id("messagePopup"),"verify if The data chosen by you has been successfully shared with the chosen partner against the Event Id");
Commons.clickWebelement( driver, By.id("dismissBtn"));

Commons.clickWebelement( driver, By.id("uinservices/sharewithpartner"));
Expand Down Expand Up @@ -55,7 +55,6 @@ public void shareMyData() throws Exception {
Commons.clickWebelement( driver, By.id("shareBtn"));
Commons.clickWebelement( driver, By.id("confirmShareInfo"));
Commons.clickWebelement( driver, By.id("shareInfoBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if The data chosen by you has been successfully shared with the chosen partner against the Event Id");
Commons.clickWebelement( driver, By.id("dismissBtn"));

Commons.clickWebelement( driver, By.id("uinservices/sharewithpartner"));
Expand All @@ -69,18 +68,18 @@ public void shareMyData() throws Exception {
Commons.clickWebelement( driver, By.id("gender"));
Commons.clickWebelement( driver, By.id("photo"));
Commons.clickWebelement( driver, By.id("shareBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if The data chosen by you has been successfully shared with the chosen partner against the Event Id");
Commons.assertCheck(By.id("messagePopup"),"verify if The data chosen by you has been successfully shared with the chosen partner against the Event Id");
Commons.clickWebelement( driver, By.id("dismissBtn"));

Commons.enter( driver, By.id("sharingReasonPlaceholder"), data);
Commons.clickWebelement( driver, By.id("shareBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if The data chosen by you has been successfully shared with the chosen partner against the Event Id");
Commons.assertCheck(By.id("messagePopup"),"verify if The data chosen by you has been successfully shared with the chosen partner against the Event Id");
Commons.clickWebelement( driver, By.id("dismissBtn"));
driver.findElement(By.id("sharingReasonPlaceholder")).clear();

Commons.dropdown( driver, By.id("partnerDetails"));
Commons.clickWebelement( driver, By.id("shareBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if The data chosen by you has been successfully shared with the chosen partner against the Event Id");
Commons.assertCheck(By.id("messagePopup"),"verify if The data chosen by you has been successfully shared with the chosen partner against the Event Id");
Commons.clickWebelement( driver, By.id("dismissBtn"));

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void updateMyDataName() throws Exception {
Commons.clickWebelement( driver, By.id("submitBtn"));
Commons.clickWebelement( driver, By.id("confirmUpdateData"));
Commons.clickWebelement( driver, By.id("updateMyDataBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if Your update has been successfully updated against the Event");
Commons.assertCheck(By.id("messagePopup"),"verify if Your update has been successfully updated against the Event");
Commons.clickWebelement( driver, By.id("dismissBtn"));
}

Expand All @@ -54,7 +54,7 @@ public void updateMyDataAddress() throws Exception {
Commons.clickWebelement( driver, By.id("submitBtn"));
Commons.clickWebelement( driver, By.id("confirmUpdateData"));
Commons.clickWebelement( driver, By.id("updateMyDataBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if Your update has been successfully updated against the Event");
Commons.assertCheck(By.id("messagePopup"),"verify if Your update has been successfully updated against the Event");
Commons.clickWebelement( driver, By.id("dismissBtn"));

}
Expand All @@ -71,7 +71,7 @@ public void UpdateDataWithEmail() throws Exception {
System.out.println(otp);
Commons.enter( driver, By.id("otp-input"), otp);
Commons.clickWebelement( driver, By.id("submitOtpBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if Your Email ID has been successfully updated against the Event");
Commons.assertCheck(By.id("messagePopup"),"verify if Your Email ID has been successfully updated against the Event");
Commons.clickWebelement( driver, By.id("dismissBtn"));

}
Expand All @@ -83,7 +83,7 @@ public void UpdateDataWithLanguage() throws Exception {
Commons.clickWebelement( driver, By.xpath("//div[@id='mat-tab-label-0-3']"));
Commons.dropdown( driver, By.id("preferredLang"));
Commons.clickWebelement( driver, By.id("submit"));
Commons.assertCheck(By.id("dismissBtn"),"verify if Your Language has been successfully updated against the Event");
Commons.assertCheck(By.id("messagePopup"),"verify if Your Language has been successfully updated against the Event");

}

Expand All @@ -106,7 +106,7 @@ public void UpdateDataWithoutAddressLine() throws Exception {
Commons.clickWebelement( driver, By.id("submitBtn"));
Commons.clickWebelement( driver, By.id("confirmUpdateData"));
Commons.clickWebelement( driver, By.id("updateMyDataBtn"));
Commons.assertCheck(By.id("dismissBtn"),"verify if Your update has been successfully updated against the Event");
Commons.assertCheck(By.id("messagePopup"),"verify if Your update has been successfully updated against the Event");
Commons.clickWebelement( driver, By.id("dismissBtn"));

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,8 @@ public static void wait(int wait) {
public static void assertCheck(By by,String message) throws IOException {
try {
wait(2000);
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(20));
wait.until(ExpectedConditions.presenceOfElementLocated(by));
boolean isDisplayed = Commons.isDisplayed(driver, by);
Assert.assertTrue(isDisplayed,message);

Expand Down

0 comments on commit aa5cf43

Please sign in to comment.