use of org.junit.jupiter.api.Disabled in project dhis2-core by dhis2.
the class InterpretationServiceTest method testCreateChartAndInterpretationSyncSharing.
// TODO enable
@Test
@Disabled
void testCreateChartAndInterpretationSyncSharing() throws IOException {
UserGroup userGroup = createUserGroup('A', Sets.newHashSet(userA, userB));
userGroupService.addUserGroup(userGroup);
Visualization visualization = createVisualization('A');
manager.save(visualization);
visualization.setPublicAccess(AccessStringHelper.READ_WRITE);
visualization.getSharing().addUserGroupAccess(new UserGroupAccess(userGroup, AccessStringHelper.READ));
assertEquals(1, visualization.getUserGroupAccesses().size());
manager.update(visualization);
assertEquals(AccessStringHelper.READ_WRITE, visualization.getPublicAccess());
assertEquals(1, visualization.getUserGroupAccesses().size());
Interpretation interpretation = new Interpretation(visualization, null, "test");
interpretationService.saveInterpretation(interpretation);
interpretationService.updateInterpretation(interpretation);
assertEquals(AccessStringHelper.READ_WRITE, interpretation.getPublicAccess());
assertEquals(interpretation.getUserGroupAccesses().size(), visualization.getUserGroupAccesses().size());
}
use of org.junit.jupiter.api.Disabled in project dhis2-core by dhis2.
the class SystemSettingsTests method returnDefaultValueWhenUserIsNotLoggedIn.
@Test
@Disabled("This test is broken and will only return 200 OK because the servlet redirects to the login page. //TODO: Remove")
public void returnDefaultValueWhenUserIsNotLoggedIn() {
prepareData();
// I need to log out
loginActions.removeAuthenticationHeader();
ApiResponse response = systemSettingActions.get(APPLICATION_INTRO_KEY, ContentType.TEXT.toString(), ContentType.TEXT.toString(), new QueryParamsBuilder());
response.validate().statusCode(200);
}
use of org.junit.jupiter.api.Disabled in project dhis2-core by dhis2.
the class MetadataPatchTests method shouldReturnErrors.
@Disabled("DHIS2-11434")
@Test
public void shouldReturnErrors() {
JsonObject object = JsonObjectBuilder.jsonObject().addProperty("op", "remove").addProperty("path", "/dataElementGroups").build();
dataElementActions.patch(dataElementId, Arrays.asList(object), new QueryParamsBuilder().add("importReportMode", "ERRORS_NOT_OWNER")).validate().statusCode(200).body("response.errorReports", hasSize(1));
dataElementActions.get(dataElementId).validate().body("dataElementGroups", hasSize(0));
}
use of org.junit.jupiter.api.Disabled in project dhis2-core by dhis2.
the class EventImportTest method testAddEventOnProgramWithoutRegistrationAndExistingProgramInstance.
/**
* TODO: LUCIANO: this test has been ignored because the Importer should not
* import an event linked to a Program with 2 or more Program Instances
*/
@Test
@Disabled
void testAddEventOnProgramWithoutRegistrationAndExistingProgramInstance() throws IOException {
ProgramInstance pi = new ProgramInstance();
pi.setEnrollmentDate(new Date());
pi.setIncidentDate(new Date());
pi.setProgram(programB);
pi.setStatus(ProgramStatus.ACTIVE);
pi.setStoredBy("test");
programInstanceService.addProgramInstance(pi);
InputStream is = createEventJsonInputStream(programB.getUid(), programStageB.getUid(), organisationUnitB.getUid(), null, dataElementB, "10");
ImportSummaries importSummaries = eventService.addEventsJson(is, null);
assertEquals(ImportStatus.SUCCESS, importSummaries.getStatus());
}
use of org.junit.jupiter.api.Disabled in project dhis2-core by dhis2.
the class EnrollmentAttrValidationTest method testAttributesMissingTeA.
// TODO: Fails with: (need to figure out how to force deletion here first)
// * ERROR 22:47:50,353 Failed to invoke method deleteTrackedEntityAttribute
// on DeletionHandler 'ProgramDeletionHandler' (DefaultDeletionManager.java
// [main])
@Test
@Disabled("Delete not impl.")
void testAttributesMissingTeA() throws IOException {
TrackedEntityAttribute sTJvSLN7Kcb = trackedEntityAttributeService.getTrackedEntityAttribute("sTJvSLN7Kcb");
trackedEntityAttributeService.deleteTrackedEntityAttribute(sTJvSLN7Kcb);
TrackerImportParams params = createBundleFromJson("tracker/validations/enrollments_te_attr-data.json");
TrackerImportReport trackerImportReport = trackerImportService.importTracker(params);
assertEquals(1, trackerImportReport.getValidationReport().getErrors().size());
assertThat(trackerImportReport.getValidationReport().getErrors(), everyItem(hasProperty("errorCode", equalTo(TrackerErrorCode.E1006))));
}
Aggregations