Skip to content

Commit

Permalink
MOSIP-35404
Browse files Browse the repository at this point in the history
Signed-off-by: Nandhukumar <[email protected]>
  • Loading branch information
nandhu-kumar committed Dec 2, 2024
1 parent 53bba96 commit 4919e72
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public void updateIdentity(TestCaseDTO testCaseDTO) throws AuthenticationTestExc
inputJson = inputJson.replace("$RID$", genRid);

if ((testCaseName.startsWith("IdRepository_") || testCaseName.startsWith("Auth_"))
&& inputJson.contains("dateOfBirth") && (!isElementPresent(new JSONArray(schemaRequiredField), dob))) {
&& inputJson.contains("dateOfBirth") && (!isElementPresent(globalRequiredFields, dob))) {
JSONObject reqJson = new JSONObject(inputJson);
reqJson.getJSONObject("request").getJSONObject("identity").remove("dateOfBirth");
inputJson = reqJson.toString();
Expand All @@ -173,7 +173,7 @@ public void updateIdentity(TestCaseDTO testCaseDTO) throws AuthenticationTestExc

if ((testCaseName.startsWith("IdRepository_") || testCaseName.startsWith("Auth_"))
&& inputJson.contains("email")
&& (!isElementPresent(new JSONArray(schemaRequiredField), emailResult))) {
&& (!isElementPresent(globalRequiredFields, emailResult))) {
JSONObject reqJson = new JSONObject(inputJson);
reqJson.getJSONObject("request").getJSONObject("identity").remove(emailResult);
if (reqJson.getJSONObject("request").getJSONObject("identity").has(result)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad
inputJson = inputJson.replace("$RID$", genRid);

if ((testCaseName.startsWith("IdRepository_")) && inputJson.contains("dateOfBirth")
&& (!isElementPresent(new JSONArray(schemaRequiredField), dob))) {
&& (!isElementPresent(globalRequiredFields, dob))) {
JSONObject reqJson = new JSONObject(inputJson);
reqJson.getJSONObject("request").getJSONObject("identity").remove("dateOfBirth");
inputJson = reqJson.toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static String isTestCaseValidForExecution(TestCaseDTO testCaseDTO) {
JSONArray phoneArray = new JSONArray(getValueFromAuthActuator("json-property", "phone_number"));

if (testCaseName.startsWith("IdRepository_") && testCaseName.contains("DOB")
&& (!isElementPresent(new JSONArray(schemaRequiredField), dob))) {
&& (!isElementPresent(globalRequiredFields, dob))) {
throw new SkipException(GlobalConstants.FEATURE_NOT_SUPPORTED_MESSAGE);
}

Expand All @@ -57,7 +57,7 @@ public static String isTestCaseValidForExecution(TestCaseDTO testCaseDTO) {
}

else if (testCaseName.startsWith("IdRepository_") && testCaseName.contains("Email")
&& (!isElementPresent(new JSONArray(schemaRequiredField), email))) {
&& (!isElementPresent(globalRequiredFields, email))) {
throw new SkipException(GlobalConstants.FEATURE_NOT_SUPPORTED_MESSAGE);
}

Expand Down

0 comments on commit 4919e72

Please sign in to comment.