Last active
May 25, 2021 21:03
-
-
Save dannyshain/abd0816859d11e22facd2dbfb6fb69f3 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('should trigger a confirmation with a message', () => { | |
cy.get('#confirm-button').click(); | |
cy.on('window:confirm', (text) => { | |
expect(text).to.contains('Would you like to confirm?'); | |
}); | |
cy.get('#confirm-answer').contains('Answer: Yes'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment