I want to check if the text "You must enter a value"(Screenshot attached) is present in the login screen that I have created. This appears when a user touched the input field and then clicked on a different field or area without typing anything. So I tried to test it with cypress, but it says
".type() will not accept an empty string"
Cypress:
it('Should display You must enter a value if user does not type anything', () => {
cy.get('#username').type('')
cy.contains('You must enter a value')
})
I need help in fixing this, thank you.
Aucun commentaire:
Enregistrer un commentaire