Search in sources :

Example 6 with EventActions

use of org.hisp.dhis.actions.tracker.EventActions in project dhis2-core by dhis2.

the class EventImportDataValueValidationTests method beforeAll.

@BeforeAll
public void beforeAll() throws Exception {
    programActions = new ProgramActions();
    eventActions = new EventActions();
    dataElementActions = new DataElementActions();
    new LoginActions().loginAsAdmin();
    setupData();
}
Also used : ProgramActions(org.hisp.dhis.actions.metadata.ProgramActions) DataElementActions(org.hisp.dhis.actions.metadata.DataElementActions) LoginActions(org.hisp.dhis.actions.LoginActions) EventActions(org.hisp.dhis.actions.tracker.EventActions) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 7 with EventActions

use of org.hisp.dhis.actions.tracker.EventActions in project dhis2-core by dhis2.

the class EventImportTests method before.

@BeforeAll
public void before() {
    eventActions = new EventActions();
    systemActions = new SystemActions();
    new LoginActions().loginAsSuperUser();
}
Also used : SystemActions(org.hisp.dhis.actions.SystemActions) LoginActions(org.hisp.dhis.actions.LoginActions) EventActions(org.hisp.dhis.actions.tracker.EventActions) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 8 with EventActions

use of org.hisp.dhis.actions.tracker.EventActions in project dhis2-core by dhis2.

the class UserAssignmentFilterTests method beforeAll.

@BeforeAll
public void beforeAll() throws Exception {
    eventActions = new EventActions();
    loginActions = new LoginActions();
    metadataActions = new MetadataActions();
    userActions = new UserActions();
    userUsername = ("EventFiltersUser" + DataGenerator.randomString()).toLowerCase();
    loginActions.loginAsSuperUser();
    metadataActions.importAndValidateMetadata(new File("src/test/resources/tracker/eventProgram.json"));
    userId = userActions.addUser(userUsername, userPassword);
    userActions.grantUserAccessToOrgUnit(userId, orgUnit);
    userActions.addUserToUserGroup(userId, Constants.USER_GROUP_ID);
    userActions.addRoleToUser(userId, Constants.USER_ROLE_ID);
    eventsBody = getEventsBody(programId, "l8oDIfJJhtg", userId);
}
Also used : UserActions(org.hisp.dhis.actions.UserActions) LoginActions(org.hisp.dhis.actions.LoginActions) MetadataActions(org.hisp.dhis.actions.metadata.MetadataActions) EventActions(org.hisp.dhis.actions.tracker.EventActions) File(java.io.File) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 9 with EventActions

use of org.hisp.dhis.actions.tracker.EventActions in project dhis2-core by dhis2.

the class EventExportTests method beforeAll.

@BeforeAll
public void beforeAll() {
    userActions = new UserActions();
    eventActions = new EventActions();
    loginActions = new LoginActions();
    programActions = new ProgramActions();
    loginActions.loginAsSuperUser();
    setupUser();
    closedProgramId = programActions.createProgramWithAccessLevel("CLOSED", rootOu, captureOu, searchOu, dataReadOu);
    closedProgramProgramStageId = programActions.createProgramStage(closedProgramId, "Event export tests" + DataGenerator.randomString());
    setupTrackerEvents();
    setupEvents();
    String relationshipTypeId = new RelationshipTypeActions().createRelationshipType("PROGRAM_STAGE_INSTANCE", withoutRegistrationProgram, "PROGRAM_STAGE_INSTANCE", withRegistrationProgram, true);
    relationshipId = createRelationship(events.get(captureOu), trackerEvents.get(captureOu), relationshipTypeId);
}
Also used : ProgramActions(org.hisp.dhis.actions.metadata.ProgramActions) UserActions(org.hisp.dhis.actions.UserActions) LoginActions(org.hisp.dhis.actions.LoginActions) Matchers.containsString(org.hamcrest.Matchers.containsString) RelationshipTypeActions(org.hisp.dhis.actions.metadata.RelationshipTypeActions) EventActions(org.hisp.dhis.actions.tracker.EventActions) BeforeAll(org.junit.jupiter.api.BeforeAll)

Example 10 with EventActions

use of org.hisp.dhis.actions.tracker.EventActions in project dhis2-core by dhis2.

the class EventImportValidationTests method beforeAll.

@BeforeAll
public void beforeAll() {
    eventActions = new EventActions();
    programActions = new ProgramActions();
    new LoginActions().loginAsAdmin();
    setupData();
}
Also used : ProgramActions(org.hisp.dhis.actions.metadata.ProgramActions) LoginActions(org.hisp.dhis.actions.LoginActions) EventActions(org.hisp.dhis.actions.tracker.EventActions) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

EventActions (org.hisp.dhis.actions.tracker.EventActions)10 BeforeAll (org.junit.jupiter.api.BeforeAll)10 LoginActions (org.hisp.dhis.actions.LoginActions)9 ProgramActions (org.hisp.dhis.actions.metadata.ProgramActions)6 File (java.io.File)4 MetadataActions (org.hisp.dhis.actions.metadata.MetadataActions)3 JsonObject (com.google.gson.JsonObject)2 RestApiActions (org.hisp.dhis.actions.RestApiActions)2 UserActions (org.hisp.dhis.actions.UserActions)2 FileReaderUtils (org.hisp.dhis.helpers.file.FileReaderUtils)2 Matchers.containsString (org.hamcrest.Matchers.containsString)1 SystemActions (org.hisp.dhis.actions.SystemActions)1 AttributeActions (org.hisp.dhis.actions.metadata.AttributeActions)1 DataElementActions (org.hisp.dhis.actions.metadata.DataElementActions)1 OrgUnitActions (org.hisp.dhis.actions.metadata.OrgUnitActions)1 RelationshipTypeActions (org.hisp.dhis.actions.metadata.RelationshipTypeActions)1 RelationshipActions (org.hisp.dhis.actions.tracker.RelationshipActions)1 TEIActions (org.hisp.dhis.actions.tracker.TEIActions)1 ApiResponse (org.hisp.dhis.dto.ApiResponse)1