Skip to content

Commit

Permalink
Merge pull request #1664 from nandhu-kumar/develop
Browse files Browse the repository at this point in the history
ES-1425 | Fixes for esignet with mock IDA
  • Loading branch information
lsivanand authored Oct 30, 2024
2 parents c9523fa + c111d36 commit 4ad2265
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -573,10 +573,12 @@ public static List<String> getLanguageList() {
}

private static String targetEnvVersion = "";

public static boolean isTargetEnvLatest = false;

public static boolean isTargetEnvLTS() {

if (targetEnvVersion.isEmpty()) {
if (targetEnvVersion.isEmpty() && isTargetEnvLatest == false) {

Response response = null;
org.json.JSONObject responseJson = null;
Expand All @@ -587,14 +589,16 @@ public static boolean isTargetEnvLTS() {
responseJson = new org.json.JSONObject(response.getBody().asString());

targetEnvVersion = responseJson.getJSONObject("build").getString("version");
isTargetEnvLatest = isVersionGreaterOrEqual(targetEnvVersion, "1.2");

} catch (Exception e) {
logger.error(GlobalConstants.EXCEPTION_STRING_2 + e);
}
}

// Compare the version numbers, ignoring any suffix like "-SNAPSHOT"
return isVersionGreaterOrEqual(targetEnvVersion, "1.2");

return isTargetEnvLatest;
}

private static boolean isVersionGreaterOrEqual(String version1, String version2) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,16 @@ public void onError(WebSocket webSocket, Throwable error) {
}

public static String getOtp(String emailId) {
if (ConfigManager.getUsePreConfiguredOtp().equalsIgnoreCase(GlobalConstants.TRUE_STRING)) {
return ConfigManager.getPreConfiguredOtp();
}
int otpExpTime = AdminTestUtil.getOtpExpTimeFromActuator();
int otpCheckLoopCount = (otpExpTime * 1000) / AdminTestUtil.OTP_CHECK_INTERVAL;

int counter = 0;

String otp = "";


if (ConfigManager.getUsePreConfiguredOtp().equalsIgnoreCase(GlobalConstants.TRUE_STRING)) {
return ConfigManager.getPreConfiguredOtp();
}

while (counter < otpCheckLoopCount) {
if (emailNotificationMapS.get(emailId) != null) {
String html = (String) emailNotificationMapS.get(emailId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7190,8 +7190,8 @@ public String generateFullNameToRegisterUser(String inputJson, String testCaseNa
String fullNamePattern = getValueFromSignUpSettings("fullname.pattern").toString();
List<String> fullnames = Arrays.asList(" ឮᨪដ", "᧦", "ᨃ", "៻៥᧿", "ᩅᨎ", "ᩭឫ", " ឃ ំ ដ ៹ម");
String randomFullName = getRandomElement(fullnames);
List<String> languageList = new ArrayList<>();
languageList = BaseTestCase.getLanguageList();
List<String> languageList = new ArrayList<>(BaseTestCase.getLanguageList());
// languageList = BaseTestCase.getLanguageList();

// For current sprint eng is removed.
if (languageList.contains("eng"))
Expand Down

0 comments on commit 4ad2265

Please sign in to comment.