I'm facing an issue with a form that has hidden fields. When a user selects a checkbox, some of the hidden form fields are supposed to be revealed using the jQuery function slideToggle(). The code itself is pretty simple and you can see an example here.
The problem arises when Behat still treats the form fields as invisible and non-interactable even after they have been revealed by the checkbox for the user.
Here's the scenario I’m trying to test in my feature:
When I check "form_checkbox"
And I fill in "form_field" with "some data"
My question is how can I ensure that the click listener for the checkbox has completed its execution before attempting to interact with the form? Is there a better approach to handling this situation?