From c9d7d221d6fb38328f616a9d5ec9b57b28e2924e Mon Sep 17 00:00:00 2001 From: Johan Girod Date: Fri, 22 Apr 2022 10:36:17 +0200 Subject: [PATCH] =?UTF-8?q?D=C3=A9sactive=20l'echec=20des=20tests=20cypres?= =?UTF-8?q?s=20en=20cas=20d'erreur=20ResizeObserver?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- site/cypress/support/index.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/site/cypress/support/index.js b/site/cypress/support/index.js index 46a58b9e4..5cea4d3b6 100644 --- a/site/cypress/support/index.js +++ b/site/cypress/support/index.js @@ -19,3 +19,16 @@ import './commands' // Alternatively you can use CommonJS syntax: // require('./commands') + +const resizeObserverLoopErrRe = /^[^(ResizeObserver loop limit exceeded)]/ +Cypress.on('uncaught:exception', (err) => { + /* + The error 'ResizeObserver loop limit exceeded' is benigne + Returning false here prevents Cypress from failing the test + + cf https://stackoverflow.com/questions/49384120/resizeobserver-loop-limit-exceeded + */ + if (resizeObserverLoopErrRe.test(err.message)) { + return false + } +})