Reputation: 449
I have been unit testing angular forms validation using Jasmine and Karma. Now I want to use protractor and karma for the same thing. To test if the inputs are valid or not (maxlength, required, etc).
Is it possible in protractor, since it is used for end to end testing?
Thanks,
Upvotes: 2
Views: 96
Reputation: 12950
No, I don't think checking the validity of forms is possible using Protractor. You can only validate what you see on screen. For example if the developer has added an warning/alert message if the form is not valid. You have to make the invalid scenarios and test what is expected for the end user to see on the screen.
In Protractor you get the DOM elements, not the angular models.
Upvotes: 2