medic / cht-release-testing

Used to track release testing on medic projects
2 stars 0 forks source link

Test create new lineage structure #243

Open lorerod opened 1 year ago

lorerod commented 1 year ago

Exploratory testing of creation of people and places.

The hierarchy is currently

lorerod commented 1 year ago

cht-core version: 4.1 cht-android version: v0.8.0-5

Tester Phone details Android System WebView version Android OS version APK Results Notes
Bede
Lorena Samsung Galaxy J7 8.1.0 android-v0.8.0-5-unbranded_test-xwalk Failed More details about the test here
Tatiana Samsung Galaxy A01 110.0.5481.65 10 android-v0.8.0-5-unbranded_test-webview Passed More details about the test here
tatilepizs commented 1 year ago

Test notes - Android 10

Details about the tests performed for this ticket.

About the app ℹ️ Details about the cht-core version and cht-android version image
Create a Project ✅ Created using the example provided in the document ``` { "_id": "icohs", "parent": "", "type": "contact", "contact_type": "app_instance", "name": "iCoHS App", "meta": { "created_by": "medic", "created_by_person_uuid": "", "created_by_place_uuid": "" }, "reported_date": 1624579200000 } ``` image
Create Health Facility ✅ Health Facility was created and edited with no issues. image
Create VHT Area ⚠️ The VHT area was created and edited with no issues, **but** after the creation a task was triggered with the name of `StockOut`, that task is available in the `Tasks` section of the app, but it is not available in the task section of the vht Area information. image -- image
Create Household ✅ Household was created and edited with no issues. image

NOTE: I saw some weird things related to date, for example, the Phone number and Alternative phone number fields are not shown if the Date radio button is selected, I need to select the Current date option to see them. I am adding this just as extra information, because I think it is related to the issue related to DOB that was raised already in this document

Video attached [video](https://user-images.githubusercontent.com/94494491/222005906-394c73ee-0bbb-4ee9-b986-ee15695f69dd.mov)
lorerod commented 1 year ago

Test notes - Android 8.1

Details about the tests performed for this ticket.

About the app :information_source: Details about the cht-core version and cht-android version ![aboutApp](https://user-images.githubusercontent.com/21312057/222197453-6427a866-7fb9-46de-b844-ce9595fcc904.jpg)
Create Health Facility ⚠️ Using an online user Health Facility was created with issues. The District was created, creating also a new person as Primary Contact, **but**: 1. During the creation of the new person some form's fields where missing (Phone number, Alternate Phone number, Sex*, Role, External ID, notes). I was able to continue with the next form page (generated name). Just by clicking the submit button it took me back to the first page (new person) because the field Sex is required. 2. The new person's Age was not set. https://user-images.githubusercontent.com/21312057/222199614-724a91c9-c7fc-437c-b6ee-8cdca221e0e7.mov
Create VHT Area ⚠️ Using an online user the VHT Area was created, creating also a new person as Primary Contact, **but**: 1. The new person's Age was not set. https://user-images.githubusercontent.com/21312057/222199236-2e1cedfa-940a-4379-aa37-52c80870d79c.mov
Create Household :x: Using an offline user and an offline user I wasn't able to create the Household. "Error Loading Form." message appeared. ![household error](https://user-images.githubusercontent.com/21312057/222210265-6c377aa6-8428-4f43-a739-4c7b22f4138d.jpg)
Create and Edit Person :x: Using an offline user I wasn't able to create or edit a Person. "Error Loading Form." message appeared. ![Screenshot_20230302-130232_CHT Android](https://user-images.githubusercontent.com/21312057/222525857-1ed063ca-7f1e-4a3b-beec-3ac6156fdb88.jpg) ![Screenshot_20230302-130223_CHT Android](https://user-images.githubusercontent.com/21312057/222525864-ea6ab548-60e6-47e9-868c-f3fcdd9ca09e.jpg)
tatilepizs commented 1 year ago

Test - Android 9

Trying to create a Household using Android 9 and I see the same behavior that Lorena reported in the previous comment

Error Log ``` 03-01 15:03:53.742 15663 15663 I chromium: [INFO:CONSOLE(1)] "Data node: /*/meta/deprecatedID with null-based index: undefined not found. Ignored.", source: https://192-168-86-210.local-ip.plip.com:10445/main.js (1) 03-01 15:03:53.995 15663 15663 I chromium: [INFO:CONSOLE(1)] "[object Object]", source: https://192-168-86-210.local-ip.plip.com:10445/main.js (1) 03-01 15:03:54.000 15663 15663 I chromium: [INFO:CONSOLE(1)] "Failed during the form "contact:clinic:create" rendering : ", source: https://192-168-86-210.local-ip.plip.com:10445/main.js (1) 03-01 15:03:54.008 15663 15663 I chromium: [INFO:CONSOLE(1)] "Error loading contact form.", source: https://192-168-86-210.local-ip.plip.com:10445/main.js (1) ```
Image attached image image
dianabarsan commented 1 year ago

@tatilepizs Can you please check if there are any feedback documents submitted? If not, can you please submit a feedback doc immediately after you see this error and then sync up and share the contents of the feedback doc?

tatilepizs commented 1 year ago

@dianabarsan the feedback document was created after the failure. Here it is.

dianabarsan commented 1 year ago

Sharing the relevant bit here:

Failed during the form \"contact:clinic:create\" rendering : [\"FormLogicError:
 Could not evaluate: if(selected( ../contact_dob_method,'calendar'),  
../dob_calendar, concat(format-date-time(today(),\\\"%Y\\\") - 
 /model/instance[1]/data/contact/age ,'-',format-date-time(today(),\\\"%m\\\"),'-',format-date-time(today(),\\\"%d\\\")) ), 
message: globalThis is not defined

Thanks you so much @tatilepizs for the very quick reply!

dianabarsan commented 1 year ago

This points to openrosa-extensions referring to globalThis.

dianabarsan commented 1 year ago

globalThis(https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) was added in Chrome 71

lorerod commented 1 year ago

@dianabarsan, @jkuester is there a known workaround for this error?

lorerod commented 1 year ago

@dianabarsan @tatilepizs adding the logs for Edit and Create Person Edit Person:

Failed during the form \"contact:person:edit\" rendering : [\"FormLogicError: Could not evaluate: format-date-time(today(),\\\"%Y\\\") -../age_years, message: globalThis is not defined\

Create Person:

Failed during the form \"contact:person:create\" rendering : [\"FormLogicError: Could not evaluate: format-date-time(today(),\\\"%d\\\"), message: globalThis is not defined\
dianabarsan commented 1 year ago

I'm tempted to try out a polyfill, just to see if there are further errors. I picked one option from this guy's post an pushed it to a branch

jkuester commented 1 year ago

What crazy person added globalThis to OpenRosa????

image

Son of a..... :facepalm:

dianabarsan commented 1 year ago

I'm tempted to try out a polyfill,

Another option is to patch openrosa to remove that line. At the time of the polyfill suggestion, I thought that line was critical in some way, but based on the commit message it might not be. So a patch will be less risky. @jkuester is that something that can be done easily?

tatilepizs commented 1 year ago

Thank you @dianabarsan for all your help!

Trying Diana's branch 4.1.x-globalthis, and Android 9 (xwalk apk) the problem was fixed and all the forms worked fine.

About the app ℹ️ image
Create a Household ✅ image image
Create / edit a person ✅ image image
Pregnancy form ✅ image
jkuester commented 1 year ago

Regarding patching OpenRosa, I don't think there is anything in particular that would complicate the patch. @dianabarsan noted, there is no functional effect to reverting that particular line to how it was before globalThis. Currently we are not patching anything in OpenRosa, but there is no reason we cannot add this to the list.

Another option worth weighing is just adding a custom implementation of format-date that would override the OpenRosa one. (But that would probably be harder than a patch).

dianabarsan commented 1 year ago

Another option worth weighing is just adding a custom implementation of format-date that would override the OpenRosa one. (But that would probably be harder than a patch).

I agree, I had thought about it as well but considered it the riskiest of all options.