medic / cht-core

The CHT Core Framework makes it faster to build responsive, offline-first digital health apps that equip health workers to provide better care in their communities. It is a central resource of the Community Health Toolkit.
https://communityhealthtoolkit.org
GNU Affero General Public License v3.0
466 stars 217 forks source link

E2e test generating feedback docs: Edit contacts with default config #8254

Open dianabarsan opened 1 year ago

dianabarsan commented 1 year ago

Describe the bug This test fails with:

[chrome 113.0.5672.63 linux #0-6] 1) Edit contacts with the default config.  should remove the primary contact from the clinic when the contact is deleted
[chrome 113.0.5672.63 linux #0-6] Feedback docs were generated during the test.
[chrome 113.0.5672.63 linux #0-6] Error: Feedback docs were generated during the test.
[chrome 113.0.5672.63 linux #0-6]     at Object.afterTest (/home/runner/work/cht-core/cht-core/tests/e2e/default/wdio.conf.js:302:31)
[chrome 113.0.5672.63 linux #0-6]     at runMicrotasks (<anonymous>)
[chrome 113.0.5672.63 linux #0-6]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
[chrome 113.0.5672.63 linux #0-6]     at async Promise.all (index 0)
[chrome 113.0.5672.63 linux #0-6]     at async executeHooksWithArgsShim (file:///home/runner/work/cht-core/cht-core/node_modules/@wdio/utils/build/shim.js:50:20)
[chrome 113.0.5672.63 linux #0-6]     at async Context.testFrameworkFnWrapper (file:///home/runner/work/cht-core/cht-core/node_modules/@wdio/utils/build/test-framework/testFnWrapper.js:60:40)

The error reported in the feedback doc is:

message": "Uncaught (in promise): TypeError: Cannot read properties of null (reading 'doc')
TypeError: Cannot read properties of null (reading 'doc')
at https://localhost/main.js?_sw-precache=b06b2796b1ff7211d2584e5561d38906:1:1249229
at Generator.next (<anonymous>)
at o$ (https://localhost/main.js?_sw-precache=b06b2796b1ff7211d2584e5561d38906:1:506816)
at _ (https://localhost/main.js?_sw-precache=b06b2796b1ff7211d2584e5561d38906:1:507019)
at https://localhost/main.js?_sw-precache=b06b2796b1ff7211d2584e5561d38906:1:507080
at new d (https://localhost/polyfills.js?_sw-precache=edc39369e9333bcb01fe3d162d9ada63:1:23310)
at https://localhost/main.js?_sw-precache=b06b2796b1ff7211d2584e5561d38906:1:506960
at r.updateFastActions (https://localhost/main.js?_sw-precache=b06b2796b1ff7211d2584e5561d38906:1:1249504)
at https://localhost/main.js?_sw-precache=b06b2796b1ff7211d2584e5561d38906:1:1250955
at https://localhost/main.js?_sw-precache=b06b2796b1ff7211d2584e5561d38906:1:992349",

To Reproduce TBD

Expected behavior Selecting a contact should not throw uncaught errors.

Environment

dianabarsan commented 1 year ago

I am about to disable this test, but here is the most recent failure (in master): https://github.com/medic/cht-core/actions/runs/5347610246/jobs/9696616420