Skip to content
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

ES-1425 | Fixes for esignet with mock IDA #1664

Merged
merged 2 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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