Last active
May 25, 2021 21:02
-
-
Save dannyshain/1f8ece8a2bcfd6a997a00c1dc2011a33 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 prompt with a message', () => { | |
cy.window().then(win => { | |
cy.stub(win, 'prompt').returns('This is my answer.'); | |
cy.get('#prompt-button').click(); | |
cy.get('#prompt-answer').contains('Answer: This is my answer.'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment