use of org.hisp.dhis.actions.tracker.TEIActions in project dhis2-core by dhis2.
the class TrackedEntityInstanceAclReadTests method before.
@BeforeAll
public void before() throws Exception {
teiActions = new TEIActions();
metadataActions = new MetadataActions();
userActions = new UserActions();
// Setup as SuperUser
new LoginActions().loginAsDefaultUser();
// Set up metadata (Import twice to connect all references)
metadataActions.importAndValidateMetadata(new File("src/test/resources/tracker/acl/metadata.json"));
metadataActions.importAndValidateMetadata(new File("src/test/resources/tracker/acl/metadata.json"));
// Import test data
teiActions.postFile(new File("src/test/resources/tracker/acl/data.json"));
// Set up all users for testing
users.add(new User("User A", "O2PajOxjJSa", "UserA!123"));
users.add(new User("User B", "aDy67f9ijOe", "UserB!123"));
users.add(new User("User C", "CKrrGm5Be8O", "UserC!123"));
users.add(new User("User D", "Lpa5INiC3Qf", "UserD!123"));
users.add(new User("User ALL", "GTqb3WOZMop", "UserALL!123"));
// Update passwords, so we can log in as them
// Set AllAuth if user has it and ou scopes.
// Map metadata and data sharing
users.forEach(this::setupUser);
}
use of org.hisp.dhis.actions.tracker.TEIActions in project dhis2-core by dhis2.
the class TEIimportTest method before.
@BeforeAll
public void before() throws Exception {
teiActions = new TEIActions();
eventActions = new EventActions();
enrollmentActions = new RestApiActions("/enrollments");
new LoginActions().loginAsSuperUser();
object = new FileReaderUtils().read(new File("src/test/resources/tracker/teis/teisWithEventsAndEnrollments.json")).get(JsonObject.class);
teiActions.post(object).validate().statusCode(200);
}
use of org.hisp.dhis.actions.tracker.TEIActions in project dhis2-core by dhis2.
the class RelationshipsTests method beforeAll.
@BeforeAll
public void beforeAll() throws Exception {
teiActions = new TEIActions();
metadataActions = new MetadataActions();
relationshipTypeActions = new RestApiActions("/relationshipTypes");
loginActions.loginAsSuperUser();
metadataActions.importAndValidateMetadata(new File("src/test/resources/tracker/relationshipTypes.json"));
teis = importTeis();
events = importEvents();
}
Aggregations