bolt / forms

MIT License
21 stars 27 forks source link

Disable reCaptcha fields during test execution #100

Open benr77 opened 2 years ago

benr77 commented 2 years ago

Currently my functional tests on a form with reCaptcha v3 are failing - obviously the JS is not being executed, but the backend is still looking for the reCaptcha data in the POST submission.

Is there a way to sort this? I cannot find a way to override the form field configuration based on the Symfony environment - my first thought was simply to remove the reCaptcha field if the env is "test".

Any pointers on how to achieve this would be much appreciated. Thanks.