Proposal: insert fixes for basic errors right from the Test Runner #4367
Labels
stage: proposal 💡
No work has been done of this issue
type: feature
New feature that does not currently exist
type: user experience
Improvements needed for UX
Background
I have shown Cypress Test Runner at a company where my friend works, and then had to wait in their office for an hour until the end of the work day. While sitting at one of the desks, I have noticed a person next to me writing a Cypress test - trying it out on their website. He is a front end developer, who loved the demo and immediately wanted to replace a few existing tests.
Their site polyfills
fetch
which caused Cypress test to crash due toXMLHttpRequest
property missing (when we try to wrap it for XHR stubbing). I saw his reaction - he clicked on the link in the error message https://on.cypress.io/uncaught-exception-from-application which took him to this docHe did NOT follow the link. I was next to him so I jumped into the situation, clicking on the link and explaining to him what happens. The first event on the page shows the workaround
Without me there observing it, he would be blocked. After we added the workaround, he wrote several tests, absolutely happy as a clam
Proposal
We know the spec, we know the place with
cy.visit
, we show the specific error message. We could add a button to the error message with something like "Add workaround". When the user clicks it, we can add our handler to the spec file.We could even target the handler by only handling that specific error
The purpose is not to create a universal solution, but to avoid people being blocked 100% when they try writing their first "hello Cypress" test. We could probably insert typical solution for
Related
I think this work can only happen after the in progress error improvements land (issue #3762, pull request #3930)
The text was updated successfully, but these errors were encountered: