Testing with cht-conf-test-harness - "Failed to advance to next page"

Not a question, but I wanted to leave this info out here for future me to find (and anyone else who may stumble on this issue).

Basically, I ran into an issue testing form configuration using the cht-conf-test-harness (e.g. harness.fillForm(...)). Filling my form failed with the following error:

Error encountered while filling form: [
  {
    "type": "general",
    "msg": "Failed to advance to next page"
  }
]

This error means that the test harness was unable to advance the form to the next page (using the Next button).

In my case, the (not so obvious) cause of the issue turned out to be a note field on my form that I had accidentally marked as required. I, of course, could not provide an answer to the note field and so for some reason the test harness just did not allow me to continue on to the next page.

4 Likes