Closed ostark closed 1 year ago
This is interesting! I'm not sure I understand the use case though? Why test form fields that aren't on the page?
Why test form fields that aren't on the page?
Ah, yup… 🤔 let me think on this, I have an idea similar to how ->fill()
currently works that might unify the logic.
I like the current behavior of ->fill()
not supporting fields it can not find. What's on your mind?
I got the tests passing, but I’m not sure why you’re using a virtual field instead of a regular input? Is there a good reason for the custom dom element?
Also, I’d like to suggest renaming ->fake
to ->addField
if that’s okay?
Emulate js dom manipulation
Example: Optional form fields that are created on-the-fly