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.
Setting Test Mode
Section titled “Setting Test Mode”Set the mode='test' attribute on the <snip-form> element to enable test mode.
<snip-form mode="test">Data Debug
Section titled “Data Debug”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.
Testing Error States
Section titled “Testing Error States”Toggle to test error states. This will show you how your form will look when there are errors.
Testing Submit States
Section titled “Testing Submit States”Toggle to test the submit state. This will show you how your form will look when it is submitting.
Testing Loading State
Section titled “Testing Loading State”Toggle to simulate the loading state. This will show you what will be displayed while the form is loading or being submitted.
Testing Result Content
Section titled “Testing Result Content”Toggle to test your result content. This will show you what will be displayed once the form has been successfully submitted.