Skip to content

Instantly share code, notes, and snippets.

@dannyshain
Last active May 25, 2021 21:03
Show Gist options
  • Save dannyshain/abd0816859d11e22facd2dbfb6fb69f3 to your computer and use it in GitHub Desktop.
Save dannyshain/abd0816859d11e22facd2dbfb6fb69f3 to your computer and use it in GitHub Desktop.
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