-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught exception not thrown in DevTools #5698
Comments
If you solely want to trigger the event, then using When you see Cypress mentioning an uncaught exception thrown from a cross origin script. So this error could be triggered during other events outside of This situation is strange the error is no longer printing to the console when Cypress catches it. This is a bug and we should have someone look into this. You can ignore uncaught:exceptions by adding the code below: Cypress.on('uncaught:exception', (err, runnable) => {
// returning false here prevents Cypress from
// failing the test
return false
})
context('App Tests', () => {
beforeEach(() => {
cy.visit('https://design.infor.com/code/ids-enterprise/latest/demo/components/datagrid/test-contextmenu-firstclick.html')
})
it('test right click', () => {
cy.get('[aria-rowindex="1"] > [aria-colindex="1"] > .datagrid-cell-wrapper').rightclick()
})
}) When adding this code, then rerunning the Cypress test - we now see an error in the devTools console. It appears that an error is being thrown through the popup menu widget during I'm not sure why |
Thanks! Looks like you figured out the root of the problem already.
|
@nbcp This is not the designed behavior - this is a bug. The uncaught exception should be thrown to the DevTools. We found the root of the issue though, which is a bit confusing how this is related, but the popup's third party code was at some point evaluating The code for the essential issue here is done in cypress-io/cypress#5709, but has yet to be released. The code above will run without exception when that is released. |
Actually, I am going to reopen this to track the issue of the uncaught exception not being thrown to DevTools. |
Sweet! Thanks @jennifer-shehane |
This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided. |
This issue has been closed due to inactivity. |
Current behavior:
The rightclick method is throwing an error unlike

trigger('contextmenu')
. As you can see from the screenshot below, the right click works because the context menu opens up but cypress' test fails. Can't see any js error doing the right click on the page being tested.Desired behavior:
It should work just like
trigger('contextmenu')
. Using that is the current workaround to allow tests like this to pass.Steps to reproduce: (app code and test code)
Try this simple test:
Versions
latest
The text was updated successfully, but these errors were encountered: