-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
checkValidity() returns true instead of false for min length on input #1930
Comments
@jennifer-shehane the test should pass because an error should be shown if the form is not valid. For some reason, when checkValidity() is called on the form, it returns true even though it shouldn't be. This only happens through the automated test runner. If I run the app and perform the steps manually by typing in some text to the input that doesn't meet the min length requirements and click submit, an error message appears. checkValidity() happens in app.js (line 13). when the form is submitted, checkValidity() is called on the form DOM node. You can also view the log in the console when the form is submitted. We should see this if the min length requirement is not met: |
@cmttan this is a bug in Cypress. |
@bkucera awesome. thanks for the explanation! |
@cmttan |
Current behavior:
checkValidity() returns true for min length on input field.
Desired behavior:
checkValidity() should return false when min length requirement is not met.
Steps to reproduce:
demo of bug created here: https://github.com/cmttan/cyp-demo
Versions
cypress ^3.0.1
chrome 67
macOS high sierra 10.13.5 (17F77)
The text was updated successfully, but these errors were encountered: