Projects‎ > ‎

XForms - Error Dialog

Unit Tests

They are implemented on top of the existing test-error-ajax example:

 SHOW_ERROR_DIALOG_PROPERTY set to true
SHOW_ERROR_DIALOG_PROPERTY set to false
With listener registered on errorEvent
 1 2
Without listener registered on errorEvent 3 4

The property is normally set in properties-local.xml, but to simulate this in JavaScript we can do opsXFormsProperties[SHOW_ERROR_DIALOG_PROPERTY] = true | false.

For each one of the 4 situations (1 to 4 above), simulate:
  • Click on Server-side XPath error shows the dialog
  • Click on Client-side JS error shows the dialog
Check that:
  • In #1 and #3 the dialog is shown
  • In #2 and #4 the dialog is not shown
  • In #1 and #2 the listener is called
  • In #3 and #4 the listener is not called
Comments