I am using jest and enzyme for unit testing. I have a login form and now wants to write test cases for it. How can I validate the values I have passed. Suppose I simulate email field with [email protected]. I need to check these values at the time of submitting the form.
I got the solution for it. What I did is I had Form inside my wrapper. So find Form from your wrapper, and check it's props. There you will get instance of form which you can use to get the state of your antd form.
wrapper.find(Form).props().form.getFieldValue(fieldName);