Skip to content

Commit

Permalink
chore: Alter e2e test, remove id where possible and make others more …
Browse files Browse the repository at this point in the history
…unique
  • Loading branch information
david-mackessy committed Oct 14, 2024
1 parent e98c226 commit 24a5e45
Showing 1 changed file with 13 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@ private void setupProgramStageDataElements(

private void setupMinMaxDataElements(String sourceUid1, String sourceUid2, String targetUid) {
metadataApiActions.importMetadata(metadata()).validateStatus(200);
minMaxActions.post(minMaxDataElements("OrgUnit0001", sourceUid1, "CatOptCom01"));
minMaxActions.post(minMaxDataElements("OrgUnit0001", sourceUid2, "CatOptCom01"));
minMaxActions.post(minMaxDataElements("OrgUnit0001", targetUid, "CatOptCom01"));
minMaxActions.post(minMaxDataElements("OrgUnit0Z91", sourceUid1, "CatOptComZ3"));
minMaxActions.post(minMaxDataElements("OrgUnit0Z91", sourceUid2, "CatOptComZ3"));
minMaxActions.post(minMaxDataElements("OrgUnit0Z91", targetUid, "CatOptComZ3"));
}

private String programWithStageAndDataElements(
Expand All @@ -337,41 +337,37 @@ private String programWithStageAndDataElements(
{
"name": "test program 1",
"shortName": "test program 1",
"id": "Program0001",
"programType": "WITH_REGISTRATION",
"organisationUnits": [
{
"id": "Orgunit1001"
"id": "OrgunitZ091"
}
],
"programStages": [
{
"id": "ProgStage01"
"id": "ProgStage91"
}
]
}
],
"programStages": [
{
"id": "ProgStage01",
"id": "ProgStage91",
"name": "test programStage 1",
"programStageDataElements": [
{
"id": "PSDE0000001",
"name": "test psde 1",
"dataElement": {
"id": "%s"
}
},
{
"id": "PSDE0000002",
"name": "test psde 2",
"dataElement": {
"id": "%s"
}
},
{
"id": "PSDE0000003",
"name": "test psde 3",
"dataElement": {
"id": "%s"
Expand Down Expand Up @@ -410,7 +406,7 @@ private String programWithStageAndDataElements(
{
"shortName": "Country1",
"openingDate": "2023-06-16",
"id": "Orgunit1001",
"id": "OrgunitZ091",
"description": "descript",
"name": "Country1"
}
Expand All @@ -425,36 +421,36 @@ private String metadata() {
{
"organisationUnits": [
{
"id": "OrgUnit0001",
"id": "OrgUnit0Z91",
"name": "test org 1",
"shortName": "test org 1",
"openingDate": "2023-06-15T23:00:00.000Z"
}
],
"categoryCombos": [
{
"id": "CatCombo001",
"id": "CatComboZ01",
"name": "cat combo 1",
"dataDimensionType": "DISAGGREGATION"
}
],
"categoryOptions": [
{
"id": "CatOpt00001",
"id": "CatOptZZ001",
"name": "cat opt 1",
"shortName": "cat opt 1"
}
],
"categoryOptionCombos": [
{
"id":"CatOptCom01",
"id":"CatOptComZ3",
"name": "cat option combo 1",
"categoryCombo": {
"id": "CatCombo001"
"id": "CatComboZ01"
},
"categoryOptions": [
{
"id": "CatOpt00001"
"id": "CatOptZZ001"
}
]
}
Expand Down

0 comments on commit 24a5e45

Please sign in to comment.