Search in sources :

Example 11 with UserActions

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

the class PotentialDuplicatesApiTest method beforeEachPotentialDuplicateTest.

@BeforeEach
public void beforeEachPotentialDuplicateTest() {
    trackerActions = new TrackerActions();
    userActions = new UserActions();
    loginActions = new LoginActions();
    potentialDuplicatesActions = new PotentialDuplicatesActions();
}
Also used : TrackerActions(org.hisp.dhis.actions.tracker.importer.TrackerActions) UserActions(org.hisp.dhis.actions.UserActions) LoginActions(org.hisp.dhis.actions.LoginActions) PotentialDuplicatesActions(org.hisp.dhis.actions.tracker.PotentialDuplicatesActions) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 12 with UserActions

use of org.hisp.dhis.actions.UserActions 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 13 with UserActions

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

the class OrgUnitsTest method setUp.

@BeforeEach
public void setUp() {
    loginActions = new LoginActions();
    userActions = new UserActions();
    orgUnitActions = new OrgUnitActions();
    loginActions.loginAsSuperUser();
}
Also used : OrgUnitActions(org.hisp.dhis.actions.metadata.OrgUnitActions) UserActions(org.hisp.dhis.actions.UserActions) LoginActions(org.hisp.dhis.actions.LoginActions) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 14 with UserActions

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

the class UserPaginationTest method setUp.

@BeforeEach
public void setUp() {
    LoginActions loginActions = new LoginActions();
    userActions = new UserActions();
    paginationActions = new MetadataPaginationActions("/users");
    loginActions.loginAsSuperUser();
    // Creates Users
    for (int i = 0; i < total; i++) {
        userActions.addUser(DataGenerator.randomString() + i, DataGenerator.randomString() + i, (DataGenerator.randomString() + i).toLowerCase(), DataGenerator.randomString() + "Abcd1234!" + i);
    }
}
Also used : MetadataPaginationActions(org.hisp.dhis.actions.metadata.MetadataPaginationActions) UserActions(org.hisp.dhis.actions.UserActions) LoginActions(org.hisp.dhis.actions.LoginActions) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 15 with UserActions

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

the class LoginTests method preconditions.

@BeforeAll
public void preconditions() {
    oauth2Clients = new RestApiActions("/oAuth2Clients");
    uaaActions = new UaaActions();
    loginActions = new LoginActions();
    userActions = new UserActions();
    loginActions.loginAsSuperUser();
    addOAuthClient();
    userActions.addUser(userName, password);
}
Also used : RestApiActions(org.hisp.dhis.actions.RestApiActions) UaaActions(org.hisp.dhis.actions.UaaActions) UserActions(org.hisp.dhis.actions.UserActions) LoginActions(org.hisp.dhis.actions.LoginActions) BeforeAll(org.junit.jupiter.api.BeforeAll)

Aggregations

UserActions (org.hisp.dhis.actions.UserActions)16 LoginActions (org.hisp.dhis.actions.LoginActions)12 BeforeAll (org.junit.jupiter.api.BeforeAll)7 BeforeEach (org.junit.jupiter.api.BeforeEach)6 RestApiActions (org.hisp.dhis.actions.RestApiActions)3 MetadataActions (org.hisp.dhis.actions.metadata.MetadataActions)3 JsonObject (com.google.gson.JsonObject)2 File (java.io.File)2 OrgUnitActions (org.hisp.dhis.actions.metadata.OrgUnitActions)2 ProgramActions (org.hisp.dhis.actions.metadata.ProgramActions)2 EventActions (org.hisp.dhis.actions.tracker.EventActions)2 QueryParamsBuilder (org.hisp.dhis.helpers.QueryParamsBuilder)2 Matchers.containsString (org.hamcrest.Matchers.containsString)1 UaaActions (org.hisp.dhis.actions.UaaActions)1 MetadataPaginationActions (org.hisp.dhis.actions.metadata.MetadataPaginationActions)1 OptionActions (org.hisp.dhis.actions.metadata.OptionActions)1 RelationshipTypeActions (org.hisp.dhis.actions.metadata.RelationshipTypeActions)1 PotentialDuplicatesActions (org.hisp.dhis.actions.tracker.PotentialDuplicatesActions)1 TEIActions (org.hisp.dhis.actions.tracker.TEIActions)1 TrackerActions (org.hisp.dhis.actions.tracker.importer.TrackerActions)1