UncleGedd edited a comment on issue #50: URL: https://github.com/apache/incubator-flagon-useralejs/issues/50#issuecomment-806951761
Gotcha. I was able to get this journey test passing consistently, we can also add a "retry" option to cypress where it'll attempt the test a couple times if it fails. ```js it('sends a log whenever a page is navigated away from', () => { cy.visit('http://localhost:8000') const spies = {beaconWasCalled: false}; cy.window().then(win => { cy.stub(win.navigator, "sendBeacon", () => spies.beaconWasCalled = true); cy.contains('Link to Flagon Page').click() }); cy.wrap(spies).its("beaconWasCalled").should("eq", true); }); ``` Pardon the homemade spy, I got the code from [here](https://gitter.im/cypress-io/cypress?at=5c4b838d454aad4df7a1218d) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org