Cypress tests, added exception handling for edge error messages (#4043)
Added exception handling for "Cannot read property offsetTop" of undefined
This commit is contained in:
parent
fa3ca5a84b
commit
90c074ca68
@ -48,3 +48,16 @@ before(() => {
|
||||
token = response.body.token;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// See https://docs.cypress.io/api/events/catalog-of-events#Uncaught-Exceptions
|
||||
// We want to catch some Javascript exception that we consider harmless
|
||||
Cypress.on('uncaught:exception', (err, runnable) => {
|
||||
// This message occasionally appears with edge
|
||||
// Doesn't seems like a blocket, and the test should not fail
|
||||
if (err.message.includes("Cannot read property 'offsetTop' of undefined")) {
|
||||
return false
|
||||
}
|
||||
// we still want to ensure there are no other unexpected
|
||||
// errors, so we let them fail the test
|
||||
})
|
Loading…
Reference in New Issue
Block a user