Cypress: ignore unrelated ResizeObserver client errors (#12297)

This commit is contained in:
Rob DiCiuccio
2021-01-05 17:44:02 -08:00
committed by GitHub
parent 1a2680d4a1
commit b4f6d353c9

View File

@@ -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',