use of com.cognizant.devops.platformdal.assessmentreport.InsightsAssessmentReportTemplate in project Insights by CognizantOneDevOps.
the class AssessmentReportServiceTest method testGrafanaPDFUpdateReportTemplate.
@Test(priority = 46)
public void testGrafanaPDFUpdateReportTemplate() throws InsightsCustomException {
try {
grafanaPDFreportTemplateJson.addProperty("reportId", grafanaReportId);
int grafanaReportId = assessmentService.editReportTemplate(grafanaPDFreportTemplateJson);
InsightsAssessmentReportTemplate report = (InsightsAssessmentReportTemplate) reportConfigDAL.getReportTemplateByReportId(grafanaReportId);
assessmentReportDataInit();
Assert.assertNotNull(report);
Assert.assertTrue(report.getReportsKPIConfig().size() > 0);
Assert.assertNotEquals(grafanaReportId, -1);
} catch (AssertionError e) {
Assert.fail(e.getMessage());
}
}
use of com.cognizant.devops.platformdal.assessmentreport.InsightsAssessmentReportTemplate in project Insights by CognizantOneDevOps.
the class ReportTemplateKPIContentServiceTest method testSaveReportTemplate.
@Test(priority = 7)
public void testSaveReportTemplate() throws InsightsCustomException {
try {
int response = assessmentService.saveKpiDefinition(convertStringIntoJson(registerkpi));
kpiIdList.add(response);
reportId = assessmentService.saveTemplateReport(convertStringIntoJson(reportTemplateSave));
InsightsAssessmentReportTemplate report = (InsightsAssessmentReportTemplate) reportConfigDAL.getReportTemplateByReportId(reportId);
Assert.assertNotNull(report);
Assert.assertTrue(report.getReportsKPIConfig().size() > 0);
} catch (AssertionError e) {
Assert.fail(e.getMessage());
}
}
use of com.cognizant.devops.platformdal.assessmentreport.InsightsAssessmentReportTemplate in project Insights by CognizantOneDevOps.
the class ReportTemplateKPIContentServiceTest method testEditReportTemplate.
@Test(priority = 10)
public void testEditReportTemplate() throws InsightsCustomException {
try {
int response = assessmentService.saveKpiDefinition(convertStringIntoJson(registerSecondkpi));
kpiIdList.add(response);
editReportTemplate = editReportTemplate.replace("reportIdData", String.valueOf(reportId));
log.debug(" editReportTemplate {} ", editReportTemplate);
reportId = assessmentService.editReportTemplate(convertStringIntoJson(editReportTemplate));
InsightsAssessmentReportTemplate report = (InsightsAssessmentReportTemplate) reportConfigDAL.getReportTemplateByReportId(reportId);
Assert.assertNotNull(report);
Assert.assertTrue(report.getReportsKPIConfig().size() >= 2);
} catch (AssertionError e) {
Assert.fail(e.getMessage());
}
}
Aggregations