Testing input.focus() in Enzyme
How do I test input.focus()
in enzyme. I am writing the script with react. My code is below:
How do I test input.focus()
in enzyme. I am writing the script with react. My code is below:
I need to move the cursor from textfield1 to textfield2 when I press the “Enter” from textfield1 and I need to move the cursor from textfield2 to textfield1 when I press the “Enter” from textfield2.
States are changing properly when I press “Enter” from textfield2 and textField2, but the cursor doesn’t move between text fields.