OpenClinica / enketo-oc

OpenClinica's fork of the Enketo web forms monorepo
Apache License 2.0
0 stars 1 forks source link

Create automated test framework for form-level testing #104

Open MartijnR opened 3 years ago

MartijnR commented 3 years ago

Worth spending some time to make as painless as possible to add form behavior tests. Enketo-core could serve as an example (or just be copied).

  1. Become able to drop a minimal XForm in a test folder and run this form in a browser (for manual testing)
  2. Perhaps use hardcoded dummy users.xml and clinicaldata.xml files for such forms (since the URLs are always the same within OC forms, I believe).
  3. Be able to easily write a test spec for an issue that loads the form from that folder with the ability to override the hard-coded dummy users.xml and clinicaldata.xml files.
  4. Add these form tests to the npm test script
MartijnR commented 3 years ago

Some challenges:

a. We should be able to run forms in readonly and noteonly views as well, so check if functions have been disabled properly (like calculations, clearing of non-relevant values), and that questions are set to readonly.