From b4f6d353c9e9b5993f5b1f0256e5a2f09eaee26c Mon Sep 17 00:00:00 2001 From: Rob DiCiuccio Date: Tue, 5 Jan 2021 17:44:02 -0800 Subject: [PATCH] Cypress: ignore unrelated ResizeObserver client errors (#12297) --- .../cypress-base/cypress/support/index.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/superset-frontend/cypress-base/cypress/support/index.ts b/superset-frontend/cypress-base/cypress/support/index.ts index f91eb10d7..34512f5d5 100644 --- a/superset-frontend/cypress-base/cypress/support/index.ts +++ b/superset-frontend/cypress-base/cypress/support/index.ts @@ -21,6 +21,17 @@ import readResponseBlob from '../utils/readResponseBlob'; const BASE_EXPLORE_URL = '/superset/explore/?form_data='; +/* eslint-disable consistent-return */ +Cypress.on('uncaught:exception', err => { + // ignore ResizeObserver client errors, as they are unrelated to operation + // and causing flaky test failures in CI + if (err.message && /ResizeObserver loop limit exceeded/.test(err.message)) { + // returning false here prevents Cypress from failing the test + return false; + } +}); +/* eslint-enable consistent-return */ + Cypress.Commands.add('login', () => { cy.request({ method: 'POST',