diff --git a/frontend/cypress/integration/feature/feature.spec.ts b/frontend/cypress/integration/feature/feature.spec.ts index ec3dd69b80..b14f22508e 100644 --- a/frontend/cypress/integration/feature/feature.spec.ts +++ b/frontend/cypress/integration/feature/feature.spec.ts @@ -5,9 +5,6 @@ describe('feature', () => { const featureToggleName = `unleash-e2e-${randomId}`; const projectName = `unleash-e2e-project-${randomId}`; - const variant1 = 'variant1'; - const variant2 = 'variant2'; - before(() => { cy.runBefore(); cy.login_UI(); @@ -15,6 +12,22 @@ describe('feature', () => { }); after(() => { + cy.on('uncaught:exception', (err) => { + if ( + err.message.includes( + 'ResizeObserver loop completed with undelivered notifications', + ) + ) { + console.log( + 'Ignored an uncaught resize observer error:', + err.message, + ); + // ignore resize observer errors + // https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver#observation_errors + // returning false here prevents Cypress from failing the test + return false; + } + }); cy.deleteFeature_API(featureToggleName, projectName); cy.deleteProject_API(projectName); }); diff --git a/frontend/cypress/support/UI.ts b/frontend/cypress/support/UI.ts index 406687be26..aad2b6fb0f 100644 --- a/frontend/cypress/support/UI.ts +++ b/frontend/cypress/support/UI.ts @@ -101,6 +101,8 @@ export const createSegment_UI = (segmentName: string): Chainable => { cy.intercept('POST', '/api/admin/segments').as('createSegment'); + cy.wait(500); + cy.get("[data-testid='SEGMENT_NAME_ID']").type(segmentName); cy.get("[data-testid='SEGMENT_DESC_ID']").type('hello-world'); cy.get("[data-testid='SEGMENT_NEXT_BTN_ID']").click();