Skip to content

Testing

SnipForm comes with a built-in testing suite. This will show you in real time how your form’s data is being parsed and provide you with tools to test error, valid and loading/submit states. You can also test your results content.

Set the mode='test' attribute on the <snip-form> element to enable test mode.

<snip-form mode="test">

In the test suite, you can see the data in real time as it is being parsed. This is useful for debugging your form’s data and seeing how it will be sent.

Toggle to test error states. This will show you how your form will look when there are errors.

Toggle to test the submit state. This will show you how your form will look when it is submitting.

Toggle to simulate the loading state. This will show you what will be displayed while the form is loading or being submitted.

Toggle to test your result content. This will show you what will be displayed once the form has been successfully submitted.