Last active
October 1, 2019 10:01
-
-
Save doque/7cb204e0c251bee8040a926c29dee7f2 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('shows an error message when the auth service responds with 422', () => { | |
cy.server(); | |
cy.route({ | |
method: 'POST', | |
url: '**/auth/forgotPassword/change', | |
// url: 'https://auth.foo.com/auth/forgotPassword/change', | |
status: 422, | |
delay: 3000, | |
}).as('resetPassword'); | |
cy.visit('/'); | |
cy.xpath('//input[@type="password"]').type('abc123'); | |
cy.xpath('//input[@type="submit"]').click({ force: true }); | |
cy.wait('@resetPassword'); | |
cy.get('@resetPassword') | |
.its('status') | |
.should('eq', 422); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment