Last active
June 28, 2019 08:08
-
-
Save jennifer-shehane/3d07be568934b1f8a3af17fe156e0987 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('check validation message on invalid input', () => { | |
cy.visit('index.html') | |
cy.get('input:invalid').should('have.length', 0) | |
cy.get('#mail').type('f') // type something invalid into input | |
cy.get('button').click() // submit the form | |
cy.get('input:invalid').should('have.length', 1) | |
cy.get('#mail').then(($input) => { | |
expect($input[0].validationMessage).to.eq('I expect an email!') | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment