Cypress Testing, Edge error message about window changed, updated exeption handler (#4131)

This commit is contained in:
Florian Giroud 2021-08-30 13:35:03 +02:00 committed by GitHub
parent b7652e9036
commit f123c5e129
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,9 @@ before(() => {
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")) {
if (err.message.includes("Cannot read property 'offsetTop' of undefined")
|| err.message.includes("Cannot read properties of undefined (reading 'offsetTop')")
) {
return false
}
// we still want to ensure there are no other unexpected