From 9af9d7dc79d361f1f84ef8fb437af14b3b04bcc8 Mon Sep 17 00:00:00 2001 From: Joshua Kitenge Date: Thu, 9 Jan 2025 15:51:01 +0000 Subject: [PATCH] Fix flaky test --- cypress/e2e/with_mock_data/systems.cy.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/with_mock_data/systems.cy.ts b/cypress/e2e/with_mock_data/systems.cy.ts index 406c49642..436f07597 100644 --- a/cypress/e2e/with_mock_data/systems.cy.ts +++ b/cypress/e2e/with_mock_data/systems.cy.ts @@ -578,10 +578,18 @@ describe('Systems', () => { }); it('edits a system from a landing page', () => { + Cypress.on('uncaught:exception', (err) => { + if (err.message.includes('ResizeObserver')) { + return false; + } + }); cy.visit('/systems/65328f34a40ff5301575a4e3'); cy.findByRole('button', { name: 'systems page actions menu' }).click(); - cy.findByText('Edit').click(); + cy.findByRole('menuitem', { name: 'Edit' }).should('exist'); + cy.findByRole('menuitem', { name: 'Edit' }).click(); + + cy.findByRole('dialog', { name: 'Edit System' }).should('exist'); cy.findByLabelText('Name *').clear(); cy.findByLabelText('Name *').type('System name');