From 91d52ed7e022df33471f95d3f33c3b7e261cc706 Mon Sep 17 00:00:00 2001 From: Rob DiCiuccio Date: Tue, 5 Jan 2021 16:46:54 -0800 Subject: [PATCH] Cypress: ignore unrelated ResizeObserver client errors --- .../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 f91eb10d78a94..34512f5d59152 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',