Skip to content
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.

Cannot spy on window:alert #6

Closed
bahmutov opened this issue Jan 2, 2018 · 3 comments
Closed

Cannot spy on window:alert #6

bahmutov opened this issue Jan 2, 2018 · 3 comments
Labels

Comments

@bahmutov
Copy link
Contributor

bahmutov commented Jan 2, 2018

Silently skips alerts https://docs.cypress.io/api/events/catalog-of-events.html#Window-Alert

@bahmutov bahmutov added the bug label Jan 2, 2018
@jennifer-shehane
Copy link
Member

I know we handle alerts differently so this may not work on alert, but also try looking at this recipe to make sure the spy is setup in the right place. https://github.com/cypress-io/cypress-example-recipes/blob/master/examples/stubbing-spying__window/cypress/integration/window-stubbing.spec.js

@bahmutov
Copy link
Contributor Author

bahmutov commented Jan 2, 2018

yeah, there is no window before the mount, hmm, I added a test to experiment 8b97e63

@bahmutov
Copy link
Contributor Author

Version 1.2.0 has been published to NPM. The full release note can be found at cypress-react-unit-test/releases/tag/v1.2.0.

Tip: safely upgrade dependency cypress-react-unit-test in your project using next-update

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants