Skip to content

Instantly share code, notes, and snippets.

@Philip-Larsen-Donnelly
Created August 4, 2023 14:40
Show Gist options
  • Save Philip-Larsen-Donnelly/b2239eaf25951a2c9d4adae8fb966fec to your computer and use it in GitHub Desktop.
Save Philip-Larsen-Donnelly/b2239eaf25951a2c9d4adae8fb966fec to your computer and use it in GitHub Desktop.
tracker
Open Tracker
Open Tracker Capture App
Open Tracker Capture App
Org Unit tree.
Verify the visualization of O.U tree
Verify the visualization of O.U tree
=> The whole organisationUnit tree assigned to the user is displayed and navigable
Verify the visualization of your configured Programs per OU
Click on an OU that has the program assigned
=> Program is selectable in the dropdown and List button is enabled
Data
Verify existing data is loaded and displayed for a Tracker Program (if display list in first page is enabled)
Select the program in the dropdown
=> The grid list is displayed with existing data
Change number of rows per page
Set a bigger number of rows per page (i.eg 100)
=> The list is expanded up to the limited number (or the max if lower)
Show/hide columns
Check/uncheck some TEA
=> TEA (tracked entity attributes) are shown/hidden according to the selection
Test Print Data
Click on the Print data button at the top right panel
=> The OS print window pops-up
Test Download data
Download as XML, JSON and CSV
=> Files are downloaded in the proper format and contain information selected in Show/hide columns, number of registers match with the number of rows per page
Test sorting per column
Sort asc/desc one of the TEA
=> List is sorted accordingly
Register and enroll a new TEI
Fill all mandatory details and click on save
=> The new TEI should be enrolled and displayed in the TEI dashboard when searched for it
Edit an existing TEI and enrollment
// assumes: Having selected an OrgUnit, test it with one TEI owned by that orgUnit and another TEI owned by an orgUnit within the user's Edit permissions scope. Reason why: Most of our users are not clearly aware of TEI ownership and try editing attribute from another orgUnit (this was not possible in previous versions)
Search for a TEI and open the TEI dashboard Update one of its attributes, save and refresh page
=> The TEI contain the modified information in its Profile
Create a new Event
In a multi-stage program with repeatable stages, create an event.
=> Event is completed and saved. StoredBy and lastUpdated fields are updated accordingly
Edit an existing Event
Take the previous event Modify one of the fields
=> Event is completed and saved. StoredBy and lastUpdated fields are updated accordingly
Delete an Existing Event
Go to the previously entered event and delete it
=> Event is deleted and cannot be found in the enrollment
Verify program logic (scheduled stages, repeatable stages)
In a multi-stage program with repeatable stages Schedule an event with a future date
=> Event has the due date filled and has status SCHEDULED
Change TEI ownership (referral)
// assumes: Reason why: We have an Outbreak line-list tracker with some KPI based on referrals
In a multi-stage program with repeatable stages, make a Move permanently referal
=> event is scheduled to the new orgUnit
Delete an existing Enrollment
// assumes: All events within the enrolment must be deleted before deleting the enrolment
Delete enrolment
=> The enrolment is deleted and cannot be found for the program
Delete an existing TEI
// assumes: The enrolment must be deleted before deleting the TEI
Search for the TEI, in the TEI dashboard delete it (top right panel)
=> TEI is deleted and cannot be found
Verify that newly entered data is visible in the dashboard (run analytics)
Extract the number of events for a specific period, create a new event, run analytics on Data Administartion app
=> Number of events should have increase by one
Verify that edited data is updated in the dashboard (run analytics)
Update the previously created event, changing the value of an already entered field and run analytics on Data Administration App
=> Check that the values for that DE have changed
Search
Verify you can search a TEI
In the TEI list, search for a TEI by its unique attribute.
=> TEI is found if its registered OU is under the Search Scope
Verify searchable attributes are available
In the TEI list, search for a TEI searchable attribute
=> Attribute is displayed for sharing, TEI can be found if its attribute matches with the searchable attribute parameter.
Verify minumum attributes to search for duplicates is forced
In the maintenance program, set minimum number of attributes requred to search to 2
=> TEI should be only searchable when at least 2 attributes are filled
In the TEI list, search for a TEI searchable attribute
Filters
Verify apply any filter or combination
TEIs that apply are displayed in the list or map
=> Filter is active
Verify Reset Filters
Click on the reset arrow icon
=> Initial list is displayed
Compulsory DE
Verify Mandatory fields for TEI registration and enrollment
In the TEI list, register a new TEI leaving some mandatory fields empty
=> For a non-superuser, system should not allow TEI registration
Verify Mandatory fields for event creation
In a multi-stage program with repeatable stages, create an event and try to complete leaving some mandatory fields empty
=> For a non-superuser, system should not allow creating of event
Complete/Incomplete
Verify Complete/Reopen - Deactivate/Activate enrollment
In the TEI dashboard, complete an event from the Enrolment widget.
=> Enrolment is saved as Active
Reopen the enrolment
From a stage set as "Allow completion of enrolment after completing event"
=> Enrolment is saved as COMPLETED
Complete the enrolment
Verify Complete events
In the TEI dashboard, complete an event.
=> Event is saved as COMPLETED
Verify Incomplete events
// assumes: Program stage must be set as "Block entry form after completed"
In the TEI dashboard, Incomplete the event and try editing
=> All fields are editable.
Verify validation on completing events
// assumes: Program stage must be set as "Complete allowed only if validation passes",
In the TEI dashboard, complete an event that does not pass a validation
=> An error/warning is rased and completion is not performed
Verify Complete Enrollment with incompete events
// assumes: 1. The program second stage should have "Ask user to complete program when stage is complete" option checked under maintenance app
// 2. The program has two or more stages
1. Select an org unit
2. Select Program from the drop down list
3. Click on the "Register" icon
4. Select the enrollment org unit
5. Select the enrollment date
6. Fill out the registration form
5. Click on save/TEI is created
4. Select the first Program Stage
5. Fill in the nessary event data/don't select "complete" for this stage
6.Select the second Program Stage
7. Fill in the nessary event data
8. Click on "Complete" for this stage
9. Click on "Complete" on the Enrollement
=> Complete enrollment should be allowed even with uncompleted events
Data Entry Form
Verify form layout (order of sections, attributes) for TEI registration and enrollment
// assumes: Test with basic form and section form. Reason why: All our programs are set in basic form but for our Outbreak tracker due to the amount of TKAs we'd like to use section forms.
In the maintenance program, check the order
=> TKAs are sorted accordingly
Go to the tracker and register a TEI and check the order
Verify value type validation at entry at TEI registration
In the maintenance program, set a tka as mandatory
=> TKA is shown as mandatory in the form
Verify form layout (order of sections, data elements ) for event creation
// assumes: Test it in Section form
In the maintenance program, check the order
=> DE are sorted accordingly
Go to the TEI dashboard and check the order
Verify value type validation at entry at event creation
In the maintenance program, set a tka as mandatory
=> TKA is shown as mandatory in the form
TEI Feature Types
Verify capturing polygon for TEI feature types
// assumes: 1. The tracked entity type, featuret type should be selected as polygon under maintenace app
1. Select a program
2. Select a TEI
3. Click on the "map" Icon from the profile section
4. Click on the "Polygon" Icon and draw a polygon
5. Click on "Capture"
6. Fill in the nessary event data and click on save
7. on the TEI Dashboard/Profile widget, click on Edit profile
8. Click on the "map" Icon and very the map is correct
=> Polygon map should be captured under profile section of TEI enrollement
Verify capturing point coordinates for TEI feature types
// assumes: 1. The tracked entity type, featuret type should be selected as point under maintenance app
1. Select a program
2. Select a TEI
3. Click on the "map" Icon from the profile section
4. Click on the "Point" Icon and select a coordinate
5. Click on "Capture"
6. Fill in the nessary event data and click on save
7. on the TEI Dashboard/Profile widget, click on Edit profile
8. Click on the "map" Icon and very the map is correct
=> Point Coordinate should be captured under profile section of TEI enrollement
Relationship Type
Verify Bi-directional relationships are working as expected
// assumes: 1. The Relationship Type should have "Bidirectional" set to true with a relationship going from TEI to a TEI.
// 2. User should have approprtiate access to the Relationship Type
1. Select a program
2. Open a TEI that has "access" to the relationship type
3. Select the Bi-directional Relationship Type
4. Select a Program to create the relationship with
5. Select/Create a TEI to have this relationship with
=> Bi-directional relationship will be created with two TEI's , the relationship type name and the two ends of the relationship type are correct
Verify relationships between new event and existing TEI is working as expected
Program Rules
Verify program rule Action "Assign value" is working as expected
// assumes: 1. Got to maintenance app, select Tracker program and then select program rule and filter program rules applied for that program
// 2. Click Edit Program Rule by selecting the three dots
// 3. Click on program rule expressions and check for which variable the program rule applied to
// 4. Click on program rule action and check the program rule applied
Select the program that applies "Assign Value" program rule
Select TEI
Enter event data and check that the program rule expression triggers the program rule to fill the tracked entity attribute/data element with a new value
=> The value entered will be calculated and assigned to the Dataelement /tracked entity attribute or program rule variable
Verify program rule Action "Display key/value pair" is working as expected
Select the program that applies "Display key/value pair" program rule
Select TEI
Enter event data or select the tracked entity attribute/data element the program rule experssion assigned too
=> An expression will be displayed on the given widget
Verify program rule Action "Display text" is working as expected
Select the program that applies "Display text" program rule
Select TEI
Enter event data or select the tracked entity attribute/data element the program rule experssion assigned too
=> An expression will be displayed on the given widget
Verify program rule Action "Error on complete" is working as expected
Select the program that applies "Error on complete" program rule
Select TEI
Enter event data or select the tracked entity attribute/data element the program rule experssion assigned too
=> The error text or expression will be displayed next to the data element or tracked entity attribute based on the program rule expression
Verify program rule Action "Hide Field" is working as expected
Select the program that applies "Hide field" program rule
Select TEI
Enter event data or select the tracked entity attribute/data element the program rule experssion assigned too
=> Based on the "Hide Field" program rule experssion the data element/tracked entity attribute will be hiden or a custom message will be displayed
Verify program rule Action "Hide option" is working as expected
Select the program that applies "Hide option" program rule
Select TEI
Enter event data or select the tracked entity attribute/data element the program rule experssion assigned too
=> the "Hide option" program rule will be triggered
Verify program rule Action "Hide option group" is working as expected
Select the program that applies "Hide option group" program rule
Select/Register TEI
Enter event data or select the tracked entity attribute/data element the program rule experssion assigned too
=> the "Hide option group" program rule will be triggered
Verify program rule Action "Hide program stage" is working as expected
Select the program that applies "Hide program stage" program rule
Select TEI
Enter event data or select the tracked entity attribute/data element the program rule experssion assigned too
=> Based on the "Hide program stage" program rule experssion, the program stage will be hiden
Verify program rule Action "Hide section" is working as expected
Select the program that applies "Hide option group" program rule
Select TEI
Enter event data or select the tracked entity attribute/data element the program rule experssion assigned too
=> Based on the "Hide section" program rule experssion, the program stage with a section to hide will be hiden
Verify program rule Action "Make field Mandatory" is working as expected
Select the program that applies "Make field Mandatory" program rule
Select TEI
Enter event data or select the tracked entity attribute/data element the program rule experssion assigned too
=> Based on the "Make field Mandatory" program rule experssion, the data element/tracked entity attribute will be mandatory and cant be empty value
Verify program rule Action "Schedule message" is working as expected
// assumes: Program/ Program stage notification template should be created which will be triggered by the program rule
Select the program that applies "Schedule message" program rule
Select TEI
Enter event data or select the tracked entity attribute/data element the program rule experssion assigned too
=> Based on the message template (enrollment notification, immunization visit missed notification, immunization visit reminder), the scheduled message will be notified on the specified date on the widget selected (feeback..)
Verify program rule Action "Send message" is working as expected
Select the program that applies "Send message" program rule
Select/Register TEI
Enter event data or select the tracked entity attribute/data element the program rule experssion assigned too and save the event
=> Depending on the sending information filled on program stage notification, the user/user group will receive a message based on the program rule expression
Verify program rule Action "Show error" is working as expected
Select the program that applies "Show error" program rule
Select TEI
Enter event data or select the tracked entity attribute/data element the program rule experssion assigned too
=> The error text or expression will be displayed next to the data element or tracked entity attribute based on the program rule expression
Verify program rule Action "Show option group" is working as expected
Select the program that applies "Show option group" program rule
Select/Register TEI
Enter event data or select the tracked entity attribute/data element the program rule experssion assigned too
=> The "show option group" program rule will be triggered
Verify program rule Action "Show warning" is working as expected
Select the program that applies "Show warning" program rule
Select/Register TEI
Enter event data or select the tracked entity attribute/data element the program rule experssion assigned too
=> Based on the "Show warning" program rule experssion the data element/tracked entity attribute will be hiden or a static text will be displayed
Verify program rule Action "Warning on complete" is working as expected
Select the program that applies "Warning on complete" program rule
Select/Register TEI
Enter event data/select the data element/tracked entity attribute which has program rule experssion
=> Based on the "Warning on complete" program rule experssion the data element/tracked entity attribute will be hiden or a static text will be displayed
Translations
Verify that translations apply to Registration Page and TEI dashboard (Program Name, Attributes, Program Stages, Options, Sections, Data Elements, Indicators)
// assumes: DHIS2 use Locale from the Maintenace app and Translation apps to translation the user interface and for localization of the metadata content in the database. Make sure the program already have translated user interface objects on these localization tools.
Change user language settings to other than english (preferably to your system working language)
=> UI elements should be displayed in the language selected
// assumes: Make sure the program already have translate database objects on these localization tools.
Change database language settings to other than english (preferably to your system working language)
=> Database metadata content should be transalted in the language selected
Reports
Run program summary
Go to tracker program -> Reports -> Program Summary -> Select a period of 6 months to All children
=> A report with all TEI with their events contained within the selection period shows up
Run program statistics
Go to tracker program -> Reports -> Program Statistics -> Select a period of 6 months to All children
=> Charts based on program show up
Run upcoming events
Go to tracker program -> Reports -> Upcoming events -> Select a date "Events due in a week"
=> At least the event scheduled in one of the previous tasks should appear
Run Overdue events
Go to tracker program -> Reports -> Overdue events
=> Overdue events are listed
TEI Dashbaord
Test Top bar settings (show)
Set an attribute as Shown in the settings
=> Attribute is presented in the top bar
Test Top bar settings (sort)
Repeat previous action with another attribute and change sort order
=> Sorted accordingly
Test dashboard widgets
Add a widget
=> Widget is shown
Remove another widget
=> Widget is removed
Test save dashboard as default
Having changed the dashboard in previous steps
=> Dashboard layout (widgets shown/hidden, order) is maintained
Save dashboard as default
Clear the cache or loggin with a different user
Go to the TEI dashboard and check layout
Test lock layout for all users
Having changed the dashboard in previous steps
=> Dashboard layout (widgets shown/hidden, order) is shown as of defined in the previous action
Lock dashboard for other users
Clear the cache or loggin with a different user
Go to the TEI dashboard and check layout
Create new relationship with UID specified using trackedentityinstance endpoint [DHIS2-4590](https://dhis2.atlassian.net//browse/DHIS2-4590)
-- When creating a new relationship as part of the payload using the trackedEntityInstance endpoint, users should be able to provide the UID of the newly created relationship.
-- If no UID is given, a new relationship should be created with an UID generated by the server.
-- If UID is given and not already taken, a new relationship should be created with the specified UID.
-- If UID is given and already taken, the relationship should update the existing relationship.
1 POST /api/trackedEntityInstances
// data:
{
"orgUnit": "bSj2UnYhTFb",
"trackedEntityInstance": "qO7MkWVJhh0",
"trackedEntityType": "nEenWmSyUEp",
"relationships": [
{
"relationship": "ABC123ABC12",
"relationshipType": "R74HPJyNLs9",
"from": {
"trackedEntityInstance": {
"trackedEntityInstance": "qO7MkWVJhh0"
}
},
"to": {
"trackedEntityInstance": {
"trackedEntityInstance": "Ks7qyuc30Xc"
}
}
}
]
}
=> GET /api/trackedEntityInstances/qO7MkWVJhh0?fields=* should return a a payload including the new relationship with the UID (called "relationship" in the payload) "ABC123ABC12"
2 POST /api/trackedEntityInstances
// data:
{
"orgUnit": "bSj2UnYhTFb",
"trackedEntityInstance": "qO7MkWVJhh0",
"trackedEntityType": "nEenWmSyUEp",
"relationships": [
{
"relationship": "ABC123ABC12",
"relationshipType": "R74HPJyNLs9",
"from": {
"trackedEntityInstance": {
"trackedEntityInstance": "qO7MkWVJhh0"
}
},
"to": {
"trackedEntityInstance": {
"trackedEntityInstance": "Yac9VDXFTxr"
}
}
}
]
}
=> GET /api/trackedEntityInstances/qO7MkWVJhh0?fields=* should return a a payload including the existing relationship with the UID (called "relationship" in the payload) "ABC123ABC12", but now the "to" property should reference "Yac9VDXFTxr" and not "Ks7qyuc30Xc"
3 POST /api/trackedEntityInstances
// data:
{
"orgUnit": "bSj2UnYhTFb",
"trackedEntityInstance": "qO7MkWVJhh0",
"trackedEntityType": "nEenWmSyUEp",
"relationships": [
{
"relationshipType": "R74HPJyNLs9",
"from": {
"trackedEntityInstance": {
"trackedEntityInstance": "qO7MkWVJhh0"
}
},
"to": {
"trackedEntityInstance": {
"trackedEntityInstance": "Ks7qyuc30Xc"
}
}
}
]
}
=> GET /api/trackedEntityInstances/qO7MkWVJhh0?fields=* should return a a payload with a new relationship with a generated UID ("relationship" property"); Generated by the server.
when POST to api/trackedEntityInstances with enrollments and events in payload [DHIS2-11501](https://dhis2.atlassian.net//browse/DHIS2-11501)
-- The issue was that, in ownerCache where the ownership org unit is saved into cache and retrieved from there, the key generation technique caused only a single entry to be in cache and the wrong unit was being retrieved from this cache.
-- The pre requisite to test this issue is,
-- ProgramA (Ex: Child Program) with AccessLevel = Protected.
-- Normal UserA with capture Scope as "Njandama". Search scope as "Bo"
-- Normal UserB with capture Scope as "Ngelehun". Seach scope as "Bo".
1 As UserA enroll teiA into programA into Njandama with some events.
=> Should create enrollment and events in Njandama
2 Fetch the teiA along with its enrollments and events.
// api/trackedEntityInstances/uid.json?program=programUID&fields=*
=> Should get the response with enrollment and event details
3 Now as UserB fetch the same teiA data using the same API
// api/trackedEntityInstances/uid.json?program=programUID&fields=*
=> Should get an OWNERSHIP ACCESS DENIED response.
4 Enroll teiB into programA into Ngelehun with some events
=> Should be able to createt enrollment and events in Ngelehun
5 Fetch the teiB along with itsB enrollments and events.
// api/trackedEntityInstances/uid.json?program=programUID&fields=*
=> Should get the response with enrollment and event details
6 Now Fetch the teiA along with its enrollments and events.
// api/trackedEntityInstances/uidA.json?program=programUID&fields=*
=> Should get an OWNERSHIP ACCESS DENIED response.
Check that events cannot be deleted through API if the user doesn't have write access
-- Create the following users with access to programs:
-- 1. testuser1 with Data capture Org unit =Ngelehun CHC
-- 2. testuser2 with Data capture Org unit =Njandama MCHP
-- 3. testuser2 with Data capture Org unit =Bendu CHC and Search Org Unit = Sierra Leone
-- Make sure above users do not have All (full authority)
1 Create an event for Child program using userA
Make a note of 2 events ids.
// Test Event :
// https://play.dhis2.org/2.30/api/events.json?trackedEntityInstance=KdO0NnUerNj
=> Event should get created Birth” is ACTIVE event. “Baby Postnatal” will be a Scheduled Event
2 Delete the above events both "ACTIVE" and"SCHEDULE" using UserB
// Example:
// Active event:
// https://play.dhis2.org/2.30/api/events/R4Qw0thwSdm
// Schedule event:
// https://play.dhis2.org/2.30/api/events/OwwDClgcc7p
=> UserB has no write access and should not be able to delete
3 Delete the above events both "ACTIVE" and"SCHEDULE" using UserC
// Example:
// Active event:
// https://play.dhis2.org/2.30/api/events/R4Qw0thwSdm
// Schedule event:
// https://play.dhis2.org/2.30/api/events/OwwDClgcc7p
=> ACTIVE event should not get deleted and SCHEDULED event should get deleted
Check API for Returning Events For Multiple Programs And Stages
1 1, Create new TEI for child program for OU = Ngelehun CHC
2. In program stage "Birth" , enter some values for data element
3. n program stage "Baby postnatal" , enter some values for data element
// Eg:
// Appgar score = 11
// Infant weight = 3500
=> TEI should be created
2 Query the API to see the data for the specified date elelment for multiple program stages
// https://play.dhis2.org/2.32.0/api/32/analytics/enrollments/query/IpHINAT79UW.json?dimension=ou:DiszpKrYNg8&dimension=A03MvHHogjR.a3kGcGDCuk6:eq:11&dimension=ZzYYXq4fJie.GQY2lXrypjO:eq:3500&&startDate=2019-01-01&endDate=2019-10-31
=> It should show fdata or the data element of all program stages
Completed event form should not be editable
1 Go to maintenance app and validate test data for program
// Program: Child programme
// Program stage: Birth
// Option "Block Entry form after completed" checked
=> Data should match
2 Go to tracker capture app
=> App is opened
3 Select an org unit that has Child programme program
// Sierra Leone/Bo/Badija/Njandama
=> Org unit selected
4 Choose one of the tracked entity instances
// i.e Stephanie
5 Complete birth stage
=> Stage is completed;
=> Form is no longer editable.
Check program rules works correctly while adding relationship
-- Prerquisite : Create a program rule and assign value as program rule actions
1 Create a program rule for "WHO RMNCH tracker"
// Program rule expression :
// d2:hasValue('firstName')
// Program rule action:
// Action : Assign value
// Tracked entity attribute assign to : Last name
// Expression to evaluate and assign :A{firstName}
=> Program rule created
2 1. Open tracker capture and select the above program and Click on 'Register'.
2. Enter first name and see last name is auto prefilled with the same value as first name
3. Now, specify other details and click 'Save and Continue' to enter tracked entity instance of this registered case.
4. From relationship widget, click on 'Add' and specify a relationship type in the screen that appears.
5. From 'Please select the program' select the same program, and click on Register.
6. Repeat step 2
=> Program rule should work correctly in relation ship
Send message (notifications) program rules
-- Tests functionality of sending messages triggered by program rules.
-- Prerequisite:
-- Email settings
1 Edit to an existing program
// * Program: Child Health
=> Program is opened
2 Navigate to the notifications window and add new program stage notification
// * name : Child Health Notification
// * subject template : nutritional advice
// * message template :
// It appears A{w75KJ2mc4zz} A{zDhUuAYrxNC} is under weight weighing just #{UXz7xuGCEhU} , would you please refer the mother to the nutrition section of V{org_unit_name} for supplement collection.
// * when to send: program rule
// * where to send: user group
=> Message template is created successfully
3 Create program rule to send above message template
// * name: send nutritional alert
// * expression: #{chweight} < 5000
// * action: send message: child health notification
=> Program rule is created
4 Go to tracker capture and enroll a child in Child Health program with a weight < 5000. Save and continue
// * org unit :Ngelehun CHC
=> User receives message
Adding a new relation by creating a new child entity
-- It should be possible to create a new child entity and add it to the MNCH tracked entity relations directly from the MNCH tracked entity.
-- Precondition: SierraLione DB
1 Open the tracker capture app
=> The tracker capture app will load and display an OrgUnit Tree and a page with a few fields
2 Navigate the tree: Sierrra Leone -> Bo -> Badjia -> Njandama MCHP. Click on Njandama MCHP
3 Select "MNCH / PNC (Adult Woman)" in the first dropdown menu on the main page and then click Register
4 Fill in the form
// First name: Alice
// Last name: Thompson
// Date of birth: 1990-01-01
5 Click "Save and continue"
=> The tracked entity screen should display.
6 Click "Add child" in relationships
=> Popup should appear
7 Click the green button with the plus icon.
=> A form for registering a new child should appear.
8 Fill in the form.
// First name: Peter
// Last name: Thompson
// Gender: Male
9 Click "Save"
=> The popup should hide and the child should appear in the list of relationships.
10 Switch to another program and back again.
=> Verify that the child still appears in the list of relationships
Test d2:relationshipCount
-- Test relationship count function.
1 Create a new program indicator
// expression: d2:relationshipCount()
// Program: Child
// programme
// Anlaytics type: Enrollment
// Aggregation type: Sum
2 Enroll a new TEI into the program, and add relationships to this TEI
// Child programme
3 Run analytics
4 Open Data Visualizer -> pivot table and run the program indicator for the current period(where the child was enrolled)
=> The relationships are summed up in the Data Visualizer -> pivot table report.
Support creation of polygons in location map picker for tei
-- Testing polygon and point location map picker for TEI
1 In Tracked entity type maintenance, select Person
2 Set featureType to polygon and save the tracked entity type
3 Open registration in tracker capture app with this selection: Org unit: Ngelehun CHC, program: MNCH / PNC (Adult Woman)
=> "Polygon on map" field should appear in the "Profile" section
4 Click the "map" icon
=> Map should open in a dialog
5 Click the polygon icon and draw a polygon
=> a polygon should get drawn
6 Click capture
=> Field should say "Polygon captured"
7 Fill in any other required fields and click save
=> Should be redirected to the TEI dashboard
8 On profile widget, click edit
=> "Polygon on map" field should appear in the form
9 Click the map icon again and verify that the polygon is correct
10 Change the polygon and click capture
11 Save the tei form
12 Refresh page. On profile widget, click edit. Then open the map again to verify the change
13 Go back to Tracked entity type maintenance and change the feature type for Person to Point (Coordinates)
14 Repeat step 3-12 for coordinates
Check translation for description works correctly in tracker capture form
-- Test checks functionality of database translation works as intended.
1 Go to the Translations app and select Portuguese locale
=> Translation app is opened and portuguese locale selected
2 Modify Data element "Apgar score" and save
// Apgar score:
// * Description: O Apgar é um teste rápido realizado em um bebê 1 e 5 minutos após o nascimento. A pontuação de 1 minuto determina o quão bem o bebê tolerou o processo de parto. A pontuação de 5 minutos informa ao médico como o bebê está fora do útero da mãe.
// * Form name: APGAR pontuação
=> Translation is saved
3 Modify data element BCG Dose and save
// Form name : BCG injeção
=> Translation is savaed
4 Go to User settings and change database language to Portuguese
=> User settings updated
5 Clear cache
=> Cache successfully cleared
6 Go to Tracker Capture and register a child
// * Org unit : Ngelehun CHC
// * program : Child Programme
=> Form names for the data elements translated are in portuguese
7 Hover over the first data element "APGAR pontuação " and click once
=> Description is in portuguese
Check Tracker capture - "complete" should be available when stage 1 displayed with enrollment
1 1. Go to program -- Child program
2. Make sure "Birth" program stages has default basic form
3. Register new tracker registration for child program
4. Check " Complete Stage Yes/No" mandatory field is shown
=> Complete stage "Yes/No" field should be shown
2 Fill the form and don't choose mandatory "Complete stage" and click save and continue
=> Save should not be done and red text "required" should be shown below "Complete stage" field
3 1.Choose "No" on "complete stage" and click save and continue
2. Check "Birth" program stage has complete button
=> 1. Save should be successful and landed in tracker dashboard stage .
=> 2. Birth program stage should have complete button
4 1. Register new tracker registration for child program
2.Choose "Yes" on "complete stage" and click save and continue
3. Check "Birth" program stage has completed
=> 1. Save should be successful and landed in tracker dashboard stage .
=> 2. Birth program stage should have completed
5 Repeat the steps 1-4 for Section form
=> It should work as expected
6 Repeat the steps 1-4 for Custom form
=> It should work as expected
Check routing in tracker capture main screen
-- Testing routing of Tracker Capture program.
1 1.Go to Tracker capture
2.Select Org unit=Ngelehun CHC and Program = Child program
3. Check the URL has the Program with ID
// https://play.dhis2.org/dev/dhis-web-tracker-capture/index.html#/?program=IpHINAT79UW
=> Program should mentioned in the URL
2 Change to TB program and see the program ID has changed to TB program in the URL
// https://play.dhis2.org/dev/dhis-web-tracker-capture/index.html#/?program=ur1Edk5Oe2n
=> Program should get changed with TB program ID
3 In the above step 2 URL(https://play.dhis2.org/dev/dhis-web-tracker-capture/index.html#/?program=ur1Edk5Oe2n), try to change Program = IpHINAT79UW and press enter.
2. Check it changes to child program
=> It should show the child program lists
Check add new event button is disabled when the program stage is not repeatable in Tabular data entry
-- Choose the program that has one program stages with "Repeatable" and other without "Repeatable" .
-- For the below test, Chosen "TB Program" with Not Repeatable program stages = TB visit and Repeatable program stages = "Lab monitoring" & "Sputum smear microscopy test"
1 1.Enrol a TEI to TB program
2.Change Layout to "Tabular Data Entry"
3.Add and complete a TB visit
=> Itshould get completed
2 1. Try to add again a TB visit and check the "+" button for adding new events is disabled
=> The "+" button for adding new events should be disabled
3 1. Try to complete "Lab monitoring" and add again new event
2. The "+" button for adding new events is enabled and new event gets added
=> The "+" button for adding new events should be enabled and new event gets added
4 1. Try to complete "Sputum smear microscopy test" and add again new event
2. The "+" button for adding new events is enabled and new event gets added
=> The "+" button for adding new events should be enabled and new event gets added
5 Go to "TB" program and
uncheck the box "Auto generate event " for TB Visit program stage
=> It should be unchecked and saved
6 1.Enroll a TEI to TB program
2.Change Layout to "Tabular Data Entry"
3.Check TB visit event was not autogenerated
4. Check "+" button for adding new event is enabled and try to add new vent for TB visit
=> New TB event should get added and completed
7 Try to add again a TB visit and check the "+" button for adding new events is disabled
=> The "+" button for adding new events should be disabled
8 1. Try to complete "Lab monitoring" and add again new event
2. The "+" button for adding new events is enabled and new event gets added
=> The "+" button for adding new events should be enabled and new event gets added
9 1. Try to complete "Sputum smear microscopy test" and add again new event
2. The "+" button for adding new events is enabled and new event gets added
=> The "+" button for adding new events should be enabled and new event gets added
Bi directional relationships test
-- Testing Bi-directional relationship of TEI's.
-- The test uses Sierra Leone DB.
1 Go to the Maintenance App and create a relationship type. Ensure to set "Bidirectional" to true and fill in names for both ends of the relationship. Also make the relationship go from a TEI to a TEI.
=> Relationship type should be saved.
// Ensure that the sharing settings for the relationship type for the current user is data write.
3 Open Tracker Capture App.
=> App should open.
4 Open a TEI that has "access" to the relationship type that was just created.
=> User should be redirected to TEI dashboard.
5 User the relationship widget to add a new realtionship of the relationship type previously created.
=> Relationship should be created.
6 Ensure that the realtionship name is correct and click the realtionship in the list.
=> User is redirected to related TEI dashboard.
7 Check that the relationship name is correct.
=> Relationship name should be correct.
Use form name for attributes in Tracker Capture
-- Test checks functionality of form names for tracked entity attributes in Tracker Capture app.
1 Open Maintenance App.
=> App should open.
2 Go to "Tracked entity attribute".
=> Tracked entity attributes should be displayed.
3 Open the "First name" attribute.
=> Attribute should open.
4 Fill in the "Form name" and save.
=> Attribute should be saved.
5 Go to Tracker Capture App.
=> App should open.
6 Select orgUnit and program.
// OrgUnit: Ngelehun CHC
// Program: Child Programme
=> OrgUnit and program should be selected.
7 Check that the form name is displayed in the header of the TEI table.
=> Form name should be displayed for "first name".
8 Click "Register"
=> Registration form should open.
9 Check that the form name for "first name" is used in the registration form.
=> Form name should be displayed.
Check events also gets deleted when deleting enrollment
1 Enroll New TEI for child program
=> New TEI should be registered
2 Delete "Enrollment" and check events also gets deleted
=> Events should also gets deleted when deleting enrollments
Check complete enrollment is allowed even with uncompleted events
1 In the maintenance app go to Child Programme
=> Complete enrollment should be allowed even with uncompleted events
2 On the program stage section edit Baby Postnatal
3 Set "Ask user to complete program when stage is complete" to true
4 Go to Tracker Capture and enroll a TEI to Child Programme
5 5. Leave Birth event uncomplete and click on complete event (Baby postnatal stage)
6 6. Click on Complete event and enrolment on the pop up message
7 7. Click "Complete" on complete enrollment pop up message
8 8. Check user is tacke back to TEI's list screen
Check it is able to upload file to the file type data element in tracker capture
1 Check file type data element is assigned to the program
// File type data element : Birth Certificate
// Program: Child Program
=> File type data element should be added /assigned
2 1. Register new Tracked Entity instances for child program
2. In tracker dashboard under "Birth" program stage, upload any file to "Birth certificate" data element
3. Remove file using the 'delete' icon at the end of the Birth certificate field
4. Upload the file again
=> 2. File should get added successfully without any errors
=> 3. A confirmation message pops, after confirmation the file should be successfully removed
=> 4. File should get added successfully without any errors
3 Click on link for attached file
=> File should open in different browser tab
Support creation of polygons in location map picker for enrollments
-- This test verifies creating future type polygon and point on Tracker Capture App during enrollment.
1 In program maintenance, select MNCH / PNC (Adult Woman) and go to enrollment details
2 Set featureType to polygon and save the program
3 Open registration in tracker capture app with this selection: Org unit: Ngelehun CHC, program: MNCH / PNC (Adult Woman)
=> "Enrollment Polygon" field should appear in the "Enrollment details" section
4 Click the "map" icon
=> Map should open in a dialog
5 Click the polygon icon and draw a polygon
=> a polygon should get drawn
6 Click capture
=> Field should say "Polygon captured"
7 Fill in any other required fields and click save
=> Should be redirected to the TEI dashboard
8 Enrollment polygon field should appear in the Enrollment widget.
9 Click the map icon again and verify that the polygon is correct
10 Change the polygon and click capture
11 Refresh page and open the map again to verify the change
12 Go back to program maintenance and change the feature type for the enrollment to Point (Coordinates)
13 Repeat step 3-11 for coordinates
Check tracker registration is successful when registering with unique id
-- This test checks a successful registration with and without unique id when registering on tracker capture app.
1 For tracked entity attribute 'Unique ID', remove 'automatically generated' and 'unique'
=> Tracked entity attribute is updated
2 In Program WHO RMNCH Tracker, under Program Attributes, remove 'mandatory' for all attributes, except 'Unique ID' (you can remove mandatory from Unique ID too - makes no difference)
=> Program is updated
3 Through the Tracker Capture app, now try to register a new person in the WHO RMNCH Tracker Program, using any unique ID. Do NOT change the date of first visit from today's date.
=> You should not get a pop-up message saying 'Unique ID already existing'. Registrations successful
Check registration in multiple programs works correctly
1 Register a person in "WHO RMNCH tracker program,"
=> Registartaion should be done and in tracker dashboard
2 1.Use the program switcher in the top to switch to "Child Program".
2. Check the page refresh with the "Child program" details
=> It should show child program details
3 1.Use the program switcher in the top to switch to "WHO RMNCH Tracker"
2. Check the page refresh with the "WHO RMNCH Tracker" details
=> It should show "WHO RMNCH Tracker" details
=> It should show your registered enrolment
Check program rules work correctly for hiding Option group
-- This tests checks if program rules work correctly for hiding option groups in Capture app and TEI's .
1 Create new option group under maintenance app
// Eg:
// Name : new
// Option set : Age category
// Option : Choose all age categroies
=> Option group should be created
2 Check date element "IC age" uses this option set "Age category
3 Create new event program and assign the following data elements
1. Age in years
2. Gender
3. IC age
// Eg:
// Name :New event
=> New event program should get created
4 Create new tracker program program with program stage and assign the following data elements
1. Age in years
2. Gender
3. IC age
// Eg:
// Name : New tracker
// Stage name :Stage 1
=> New tracker program should get created
5 Create new Program rule variable for Data element "Gender" for both above new event and tracker program.
Type:
Data element in newest event in this program
// Name :gender
=> New program variable should get created
6 Create new program rule for new event program with same as example given in test data
// Program details:
// 1. Program : New event
// 2. Name : Hide option group if gender is male
// Program rule expression:
// #{event_program_rule_variable} == 'Male'
// Program actions:
// Action :Hide option group
// Data element :IC Age
// Option group to hide: new
=> Program rule created for event program
7 Create new program rule for new tracker program with same as example given in test data
// Program details:
// 1. Program : New tracker
// 2. Name : Hide option group if gender is male
// Program rule expression:
// #{tracker_program_rule_variable} == 'Male'
// Program actions:
// Action :Hide option group
// Data element :IC Age
// Option group to hide: new
=> Program rule created for tracker program
8 1. Register new event in event capture for the above new program
2. Choose gender = Female and see "IC Age" have shown the age category options
3.Choose gender =Male and check "IC Age" hidden option group which means no options shown
=> Option group for "IC Age" should be hidden when gender = male is chosen
9 1. Register new TEI in Tracker capture for the above new tracker program
2. In tracker dashboard , under program stage "stage 1", Choose gender = Female and see "IC Age" have shown the age category options
3.Choose gender =Male and check "IC Age" hidden option group which means no options shown
=> Option group for "IC Age" should be hidden when gender = male is chosen
10 1. Create the custom form in step 3 and 4 and execute steps 8&9
=> Hiding should work for custom form as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment