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

Enhancement to the addValidEntity Test Case #108

Merged
merged 2 commits into from
Nov 18, 2024
Merged
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 @@ -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