From b32c96d7c1a345f8ca1b3f3924130825d41f375a Mon Sep 17 00:00:00 2001 From: Felix Habib Date: Fri, 10 May 2024 09:39:55 +1000 Subject: [PATCH] Add wait in cypress to prevent test flakiness --- cypress/support/utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cypress/support/utils.js b/cypress/support/utils.js index 3e2d47ff..10266c8c 100644 --- a/cypress/support/utils.js +++ b/cypress/support/utils.js @@ -153,6 +153,9 @@ export const assertCodePaneLineCount = (lines) => { getCodeEditor().within(() => cy.get('.CodeMirror-line').should('have.length', lines) ); + + // Wait after check to ensure original focus is restored + cy.wait(500); // eslint-disable-line @finsit/cypress/no-unnecessary-waiting }; export const assertFramesMatch = (matches) =>