diff --git a/tests/ui/cypress/support/index.js b/tests/ui/cypress/support/index.js index 16a28dce..8bc32991 100644 --- a/tests/ui/cypress/support/index.js +++ b/tests/ui/cypress/support/index.js @@ -29,10 +29,15 @@ // Define a custom uncaught exception handling policy for Cypress. // Returning false prevents Cypress from failing the test. -Cypress.on('uncaught:exception', (err, runnable) => { +Cypress.on('uncaught:exception', (err, runnable, promise) => { console.log("Krill UI Test: Examining uncaught exception..") console.log("Krill UI Test: err: ", err) + if (promise) { + console.log("Krill UI Test: Ignoring unhandled promise rejection.") + return false + } + if (err.message) { if (err.message.includes('ResizeObserver loop limit exceeded')) { console.log("Krill UI Test: Ignoring 'ResizeObserver loop limit exceeded' exception")