Skip to content

Commit

Permalink
Merge pull request #108 from ELEVATE-Project/Suhas_local
Browse files Browse the repository at this point in the history
Enhancement to the addValidEntity Test Case
  • Loading branch information
SuhasVMM authored Nov 18, 2024
2 parents cf670cb + 89c22db commit 509fe26
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public void testAddingValidEntity() {
Assert.assertEquals(response.getStatusCode(), 200);
Assert.assertEquals(response.jsonPath().getString("message"), "ENTITY_ADDED");
logger.info("Validation of entity addition is successful.");
getSystemId(randomExternalId);
}

@Test(description = "Adding a invalid entity")
Expand All @@ -51,7 +52,6 @@ public void testAddingInvalidEntity() {

@Test(description = "Updating the entity with a random name", dependsOnMethods = "testAddingValidEntity")
public void testUpdateValidEntity() {
getSystemId(randomExternalId);
Response response = updateEntity(entity_Id, updatedEntityName, updatedEntityExternalId, PropertyLoader.PROP_LIST.getProperty("elevate.qa.automation.entitytype.name"));
Assert.assertEquals(response.getStatusCode(), 200);
Assert.assertTrue(response.asString().contains(updatedEntityName), "entity not found");
Expand Down Expand Up @@ -110,7 +110,7 @@ public void testInvalidFetchEntityDetails() {
@Test(description = "Mapping the entities to parent entity using CSV upload")
public void testBulkMappingEntities() {
addEntity(randomEntityName, randomExternalId, PropertyLoader.PROP_LIST.getProperty("elevate.qa.automation.entitytype.name"));
updateCSVWithChildAndParentEntityNames("src/main/resources/entities_mapping_ElevateProject.csv", "target/classes/entities_mapping_ElevateProject.csv", PropertyLoader.PROP_LIST.getProperty("elevate.qa.parent/automation.entity.externalId"));
updateCSVWithChildAndParentEntityNames("src/main/resources/entities_mapping_ElevateProject.csv", "target/classes/entities_mapping_ElevateProject.csv", PropertyLoader.PROP_LIST.getProperty("elevate.qa.parent.entity.externalId"));
Response response = bulkUploadMappingCSV("target/classes/entities_mapping_ElevateProject.csv", PropertyLoader.PROP_LIST.getProperty("elevate.qa.mapping.entity.endpoint"));
Assert.assertEquals(response.getStatusCode(), 200);
Assert.assertTrue(response.asString().contains("ENTITY_INFORMATION_UPDATE"));
Expand Down Expand Up @@ -143,6 +143,7 @@ private Response addEntity(String entityName, String externalId, String entityTy
.queryParam("type", entityTypeName)
.post(PropertyLoader.PROP_LIST.getProperty("elevate.qa.entityadd.endpoint"));
response.prettyPrint();
//getSystemId(randomExternalId);
return response;
}

Expand Down

0 comments on commit 509fe26

Please sign in to comment.