{{field.labelName[langCode][0]}}
diff --git a/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.ts b/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.ts
index f10cb520..4223f97d 100644
--- a/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.ts
+++ b/resident-ui/src/app/feature/uinservices/updatedemographic/updatedemographic.component.ts
@@ -164,7 +164,7 @@ export class UpdatedemographicComponent implements OnInit, OnDestroy {
async ngOnInit() {
this.defaultJsonValue = { ...defaultJson }
- this.initialLocationCode = "MOR";
+ this.initialLocationCode = this.appConfigService.getConfig()["resident.update-uin.machine-zone-code"];
this.locCode = 5;
this.translateService.use(localStorage.getItem("langCode"));
this.supportedLanguages = ["eng"];
@@ -493,7 +493,8 @@ export class UpdatedemographicComponent implements OnInit, OnDestroy {
let filedNameForuserInput = (item.charAt(0).toLocaleLowerCase() + item.slice(1)).replace(" ", "")
if (typeof this.userInputValues[filedNameForuserInput] !== 'string') {
this.getUserPerfLang.forEach(lang => {
- this.userInputValues[filedNameForuserInput][lang] = ''
+ if(this.userInputValues[filedNameForuserInput])
+ this.userInputValues[filedNameForuserInput][lang] = ''
})
} else {
this.userInputValues[filedNameForuserInput] = ''
@@ -690,10 +691,9 @@ export class UpdatedemographicComponent implements OnInit, OnDestroy {
let genders = this.dropDownValues.gender
let currentValueCode
genders[language].forEach(item => {
- if (item.value === currentValue) {
- currentValueCode = item.code
- }
- })
+ currentValueCode = item.value === currentValue ? item.code : currentValue
+ });
+
let self = this;
if (formControlName !== "proofOfIdentity") {
if (event.value !== currentValueCode) {
@@ -702,7 +702,7 @@ export class UpdatedemographicComponent implements OnInit, OnDestroy {
this.getUserPerfLang.forEach(item => {
let newData
genders[item].forEach(eachGender => {
- if (eachGender.code === event.value) {
+ if (eachGender.code.toLowerCase() === event.value.toLowerCase()) {
newData = { "language": item, "value": eachGender.value }
this.userInputValues[formControlName][item] = eachGender.code;
}
diff --git a/resident-ui/src/app/shared/header/header.component.html b/resident-ui/src/app/shared/header/header.component.html
index c0e6484b..2875c4db 100644
--- a/resident-ui/src/app/shared/header/header.component.html
+++ b/resident-ui/src/app/shared/header/header.component.html
@@ -21,7 +21,7 @@
{{item.label}}
-
+
diff --git a/resident-ui/src/app/shared/header/header.component.ts b/resident-ui/src/app/shared/header/header.component.ts
index f690fd0c..cc9bb13a 100644
--- a/resident-ui/src/app/shared/header/header.component.ts
+++ b/resident-ui/src/app/shared/header/header.component.ts
@@ -48,6 +48,7 @@ export class HeaderComponent implements OnInit, OnDestroy {
selectedfontsize:any = localStorage.getItem('selectedfontsize');
selectedLangData:any;
isAuthorized:boolean = false;
+ showLangDropDown:any;
constructor(
private router: Router,
@@ -79,6 +80,8 @@ export class HeaderComponent implements OnInit, OnDestroy {
getConfigData(){
if(localStorage.getItem('isDataLoaded') === 'true'){
let supportedLanguages = this.appConfigService.getConfig()['supportedLanguages'].split(',');
+ this.showLangDropDown = this.appConfigService.getConfig()['resident-multi-language-enable'];
+
if(supportedLanguages.length > 1){
supportedLanguages.forEach((language) => {
this.selectLanguagesArr.push({
diff --git a/resident-ui/src/assets/i18n/ara.json b/resident-ui/src/assets/i18n/ara.json
index cfddb3c4..148e9135 100644
--- a/resident-ui/src/assets/i18n/ara.json
+++ b/resident-ui/src/assets/i18n/ara.json
@@ -713,6 +713,8 @@
"RES-SER-526": "تم تجاوز الحد الأقصى لعدد التحديثات للسمات:- %s",
"RES-SER-470": "لا توجد سجلات",
"RES-SER-401": "استثناء قاعدة",
- "RES-SER-474": "لم يتم العثور على معرف فردي استثناء"
+ "RES-SER-474": "لم يتم العثور على معرف فردي استثناء",
+ "RES-SER-527": "الإدخال الذي أدخلته موجود بالفعل. الرجاء إدخال قيمة جديدة للمتابعة.",
+ "RES-SER-479": "حدث خطأ أثناء تنزيل البطاقة الشخصية."
}
}
diff --git a/resident-ui/src/assets/i18n/eng.json b/resident-ui/src/assets/i18n/eng.json
index ba10bd0e..9805d3ec 100644
--- a/resident-ui/src/assets/i18n/eng.json
+++ b/resident-ui/src/assets/i18n/eng.json
@@ -714,6 +714,8 @@
"RES-SER-526": "Update count limit for the attributes exceeded:- %s",
"RES-SER-470": "No Record(s) found",
"RES-SER-401": "Base exception.",
- "RES-SER-474": "Individual ID not found exception"
+ "RES-SER-474": "Individual ID not found exception",
+ "RES-SER-527": "The input you have entered already exists. Please enter a new value to proceed.",
+ "RES-SER-479": "Error in downloading personalized card."
}
}
diff --git a/resident-ui/src/assets/i18n/fra.json b/resident-ui/src/assets/i18n/fra.json
index 6b8c5218..e3338156 100644
--- a/resident-ui/src/assets/i18n/fra.json
+++ b/resident-ui/src/assets/i18n/fra.json
@@ -714,6 +714,8 @@
"RES-SER-526": "Limite du nombre de mises à jour pour les attributs dépassée : - %s",
"RES-SER-470": "Aucun enregistrement trouvé",
"RES-SER-401": "Exception de base",
- "RES-SER-474": "Exception d'identification individuelle introuvable"
+ "RES-SER-474": "Exception d'identification individuelle introuvable",
+ "RES-SER-527": "L'entrée que vous avez saisie existe déjà. Veuillez saisir une nouvelle valeur pour continuer.",
+ "RES-SER-479": "Erreur lors du téléchargement de la carte personnalisée."
}
}
diff --git a/resident-ui/src/assets/i18n/hin.json b/resident-ui/src/assets/i18n/hin.json
index 89ae1318..982365ab 100644
--- a/resident-ui/src/assets/i18n/hin.json
+++ b/resident-ui/src/assets/i18n/hin.json
@@ -714,6 +714,8 @@
"RES-SER-526": "विशेषताओं के लिए अद्यतन गणना सीमा पार हो गई:- %s",
"RES-SER-470": "कोई रिकॉर्ड नहीं मिला",
"RES-SER-401": "आधार अपवाद",
- "RES-SER-474": "व्यक्तिगत आईडी को अपवाद नहीं मिला"
+ "RES-SER-474": "व्यक्तिगत आईडी को अपवाद नहीं मिला",
+ "RES-SER-527": "आपके द्वारा दर्ज किया गया इनपुट पहले से मौजूद है। आगे बढ़ने के लिए कृपया एक नया मान दर्ज करें।",
+ "RES-SER-479": "वैयक्तिकृत कार्ड डाउनलोड करने में त्रुटि."
}
}
diff --git a/resident-ui/src/assets/i18n/kan.json b/resident-ui/src/assets/i18n/kan.json
index d83fee30..8c6c2d9a 100644
--- a/resident-ui/src/assets/i18n/kan.json
+++ b/resident-ui/src/assets/i18n/kan.json
@@ -714,6 +714,8 @@
"RES-SER-526": "ಗುಣಲಕ್ಷಣಗಳ ನವೀಕರಣ ಎಣಿಕೆ ಮಿತಿ ಮೀರಿದೆ:- %s",
"RES-SER-470": "ಯಾವುದೇ ದಾಖಲೆಗಳು ಕಂಡುಬಂದಿಲ್ಲ",
"RES-SER-401": "ಮೂಲ ವಿನಾಯಿತಿ",
- "RES-SER-474": "ವೈಯಕ್ತಿಕ ID ವಿನಾಯಿತಿ ಕಂಡುಬಂದಿಲ್ಲ"
+ "RES-SER-474": "ವೈಯಕ್ತಿಕ ID ವಿನಾಯಿತಿ ಕಂಡುಬಂದಿಲ್ಲ",
+ "RES-SER-527": "ನೀವು ನಮೂದಿಸಿದ ಇನ್ಪುಟ್ ಈಗಾಗಲೇ ಅಸ್ತಿತ್ವದಲ್ಲಿದೆ. ಮುಂದುವರಿಯಲು ದಯವಿಟ್ಟು ಹೊಸ ಮೌಲ್ಯವನ್ನು ನಮೂದಿಸಿ.",
+ "RES-SER-479": "ವೈಯಕ್ತೀಕರಿಸಿದ ಕಾರ್ಡ್ ಡೌನ್ಲೋಡ್ ಮಾಡುವಲ್ಲಿ ದೋಷ."
}
}
diff --git a/resident-ui/src/assets/i18n/spa.json b/resident-ui/src/assets/i18n/spa.json
index 962914e9..222c5be5 100644
--- a/resident-ui/src/assets/i18n/spa.json
+++ b/resident-ui/src/assets/i18n/spa.json
@@ -714,6 +714,8 @@
"RES-SER-526": "Límite de recuento de actualizaciones para los atributos excedidos: - %s",
"RES-SER-470": "No se encontraron registros",
"RES-SER-401": "Excepción básica",
- "RES-SER-474": "Excepción de identificación individual no encontrada"
+ "RES-SER-474": "Excepción de identificación individual no encontrada",
+ "RES-SER-527": "La entrada que has ingresado ya existe. Ingrese un nuevo valor para continuar.",
+ "RES-SER-479": "Error al descargar tarjeta personalizada."
}
}
\ No newline at end of file
diff --git a/resident-ui/src/assets/i18n/tam.json b/resident-ui/src/assets/i18n/tam.json
index c90f449f..724e456e 100644
--- a/resident-ui/src/assets/i18n/tam.json
+++ b/resident-ui/src/assets/i18n/tam.json
@@ -715,6 +715,8 @@
"RES-SER-526": "பண்புக்கூறுகளுக்கான புதுப்பிப்பு எண்ணிக்கை வரம்பு மீறப்பட்டது:- %s",
"RES-SER-470": "எந்த பதிவுகளும் கண்டறியப்படவில்லை",
"RES-SER-401": "அடிப்படை விதிவிலக்கு",
- "RES-SER-474": "தனிப்பட்ட ஐடி விதிவிலக்கு இல்லை"
+ "RES-SER-474": "தனிப்பட்ட ஐடி விதிவிலக்கு இல்லை",
+ "RES-SER-527": "நீங்கள் உள்ளிட்ட உள்ளீடு ஏற்கனவே உள்ளது. தொடர புதிய மதிப்பை உள்ளிடவும்.",
+ "RES-SER-479": "தனிப்பயனாக்கப்பட்ட கார்டைப் பதிவிறக்குவதில் பிழை."
}
}
\ No newline at end of file
diff --git a/residenttest/src/main/java/io/mosip/testrig/residentui/service/BaseTestCase.java b/residenttest/src/main/java/io/mosip/testrig/residentui/service/BaseTestCase.java
index e218c4fa..c5a77f5f 100644
--- a/residenttest/src/main/java/io/mosip/testrig/residentui/service/BaseTestCase.java
+++ b/residenttest/src/main/java/io/mosip/testrig/residentui/service/BaseTestCase.java
@@ -268,8 +268,6 @@ public static boolean isTargetEnvLTS() {
String url = ApplnURI + "/v1/auditmanager/actuator/info";
try {
response = RestClient.getRequest(url, MediaType.APPLICATION_JSON, MediaType.APPLICATION_JSON);
- // GlobalMethods.reportResponse(response.getHeaders().asList().toString(), url, response);
-
responseJson = new org.json.JSONObject(response.getBody().asString());
targetEnvVersion = responseJson.getJSONObject("build").getString("version");
@@ -278,9 +276,34 @@ public static boolean isTargetEnvLTS() {
logger.error(GlobalConstants.EXCEPTION_STRING_2 + e);
}
}
- return targetEnvVersion.contains("1.2");
+
+ // Compare the version numbers, ignoring any suffix like "-SNAPSHOT"
+ return isVersionGreaterOrEqual(targetEnvVersion, "1.2");
}
+
+ private static boolean isVersionGreaterOrEqual(String version1, String version2) {
+ // Remove any suffixes like "-SNAPSHOT" from the versions
+ version1 = version1.split("-")[0];
+ version2 = version2.split("-")[0];
+
+ String[] v1 = version1.split("\\.");
+ String[] v2 = version2.split("\\.");
+
+ int length = Math.max(v1.length, v2.length);
+
+ for (int i = 0; i < length; i++) {
+ int v1Part = i < v1.length ? Integer.parseInt(v1[i]) : 0;
+ int v2Part = i < v2.length ? Integer.parseInt(v2[i]) : 0;
+ if (v1Part < v2Part) {
+ return false;
+ } else if (v1Part > v2Part) {
+ return true;
+ }
+ }
+ return true; // versions are equal
+ }
+
private static Properties getLoggerPropertyConfig() {
Properties logProp = new Properties();
logProp.setProperty("log4j.rootLogger", "INFO, Appender1,Appender2");
diff --git a/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/GetMyUIN.java b/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/GetMyUIN.java
index b5a2c283..e61073d1 100644
--- a/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/GetMyUIN.java
+++ b/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/GetMyUIN.java
@@ -16,14 +16,14 @@ public class GetMyUIN extends BaseClass{
String vid =TestRunner.perpetualVid;
@Test(priority=0)
public void getMyUIN() throws Exception {
- String tempemail = ConfigManager.gettempemail();
+ String externalemail = ConfigManager.getexternalemail();
Commons.click( driver, By.id("getMyUIN"));
Commons.enter( driver, By.id("aidValue"), vid);//
Commons.click( driver, By.id("getUinSendOtpBtn"));
- String otp = MockSMTPListener.getOtp(tempemail);
+ 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"));
}
@@ -35,11 +35,11 @@ public void getMyUINWithoutAID() throws InterruptedException, IOException {
@Test(priority=2)
public void getMyUINWithInvalidOtp() throws Exception {
- String tempemail = ConfigManager.gettempemail();
+ String externalemail = ConfigManager.getexternalemail();
Commons.click( driver, By.id("getMyUIN"));
Commons.enter(driver, By.id("aidValue"), vid);
Commons.click(driver, By.id("getUinSendOtpBtn"));
- String otp = MockSMTPListener.getOtp(tempemail);
+ String otp = MockSMTPListener.getOtp(externalemail);
Commons.enter(driver, By.id("otp-input"), otp+"56");
Commons.click(driver, By.xpath("//button[@id='getUinsubmitBtn']"));
Commons.click(driver, By.id("dismissBtn"));
diff --git a/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/GetPersonalisedCard.java b/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/GetPersonalisedCard.java
index 18035f97..9d3a0fa9 100644
--- a/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/GetPersonalisedCard.java
+++ b/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/GetPersonalisedCard.java
@@ -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"));
@@ -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"));
@@ -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"));
@@ -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"));
diff --git a/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/ManageMyVid.java b/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/ManageMyVid.java
index 1ffaeced..365bf802 100644
--- a/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/ManageMyVid.java
+++ b/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/ManageMyVid.java
@@ -19,11 +19,11 @@ 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"));
@@ -31,15 +31,15 @@ public void manageMyVid() throws Exception {
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"));
}
diff --git a/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/SecureMyId.java b/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/SecureMyId.java
index 5709216b..60e76789 100644
--- a/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/SecureMyId.java
+++ b/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/SecureMyId.java
@@ -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"));
}
diff --git a/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/ShareMyData.java b/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/ShareMyData.java
index 7940fdf4..36c3bd6f 100644
--- a/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/ShareMyData.java
+++ b/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/ShareMyData.java
@@ -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"));
@@ -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"));
@@ -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"));
}
diff --git a/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/UpdateMyData.java b/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/UpdateMyData.java
index 2e456000..e3fd955f 100644
--- a/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/UpdateMyData.java
+++ b/residenttest/src/main/java/io/mosip/testrig/residentui/testcase/UpdateMyData.java
@@ -28,7 +28,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"));
}
@@ -53,7 +53,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"));
}
@@ -70,7 +70,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"));
}
@@ -82,7 +82,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");
}
@@ -105,7 +105,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"));
}
diff --git a/residenttest/src/main/java/io/mosip/testrig/residentui/utility/Commons.java b/residenttest/src/main/java/io/mosip/testrig/residentui/utility/Commons.java
index fff7f092..9afee49b 100644
--- a/residenttest/src/main/java/io/mosip/testrig/residentui/utility/Commons.java
+++ b/residenttest/src/main/java/io/mosip/testrig/residentui/utility/Commons.java
@@ -30,7 +30,7 @@ public static String getDateTime(){
public static void click(WebDriver driver, By by) throws IOException, InterruptedException {
logger.info("Clicking " + by );
-
+ wait(1000);
try {
WebDriverWait wait = new WebDriverWait(driver, Duration.ofSeconds(30));
wait.until(ExpectedConditions.elementToBeClickable(by));
@@ -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);
diff --git a/residenttest/src/main/java/io/mosip/testrig/residentui/utility/MockSMTPListener.java b/residenttest/src/main/java/io/mosip/testrig/residentui/utility/MockSMTPListener.java
index c29d4677..125f55a8 100644
--- a/residenttest/src/main/java/io/mosip/testrig/residentui/utility/MockSMTPListener.java
+++ b/residenttest/src/main/java/io/mosip/testrig/residentui/utility/MockSMTPListener.java
@@ -84,17 +84,31 @@ public CompletionStage> onText(WebSocket webSocket, CharSequence data, boolean
}
try {
ObjectMapper om = new ObjectMapper();
+ String message = "";
+ String address = "";
root = om.readValue(data.toString(), Root.class);
- if (!parseOtp(root.html).isEmpty() || !parseAdditionalReqId(root.html).isEmpty()) {
- emailNotificationMapS.put(root.to.value.get(0).address, root.html);
- logger.info(" After adding to emailNotificationMap key = " + root.to.value.get(0).address + " data "
- + data + " root " + root);
+ if (root.type.equals("SMS")) {
+ message = root.subject;
+ address = root.to.text;
+
+ } else if (root.type.equals("MAIL")) {
+ message = root.html;
+ address = root.to.value.get(0).address;
+ }
+ else {
+ logger.error("Unsupported notification type. type="+ root.type);
+ }
+
+ if (!parseOtp(message).isEmpty() || !parseAdditionalReqId(message).isEmpty()) {
+ emailNotificationMapS.put(address, message);
+ logger.info(" After adding to emailNotificationMap key = " + address + " data " + data + " root "
+ + root);
}
else {
- logger.info(" Skip adding to emailNotificationMap key = " + root.to.value.get(0).address + " data "
- + data + " root " + root);
+ logger.info(" Skip adding to emailNotificationMap key = " + address + " data " + data + " root "
+ + root);
}
} catch (Exception e) {
@@ -120,6 +134,8 @@ public static String getOtp(String emailId) {
int counter = 0;
String otp = "";
+
+
if (ConfigManager.getUsePreConfiguredOtp().equalsIgnoreCase(GlobalConstants.TRUE_STRING)) {
return ConfigManager.getPreConfiguredOtp();
}