Skip to content

Commit 1e1cb93

Browse files
committed
Wait for launcher in createNewScriptEditor command
In headless mode, the launcher takes longer to appear after closing the last tab. Add a launcher visibility check before clicking the launcher card to prevent cascading failures when the launcher hasn't rendered yet between tests. Signed-off-by: Luciano Resende <lresende@apple.com>
1 parent f3ef716 commit 1e1cb93

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cypress/support/commands.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ Cypress.Commands.add('closeTab', (index: number): void => {
258258
});
259259

260260
Cypress.Commands.add('createNewScriptEditor', (language: string): void => {
261+
// Ensure launcher is visible (may take a moment after closing a previous tab)
262+
cy.get('.jp-Launcher', { timeout: 10000 }).should('be.visible');
261263
cy.get(
262264
`.jp-LauncherCard[data-category="Elyra"][title="Create a new ${language} Editor"]:visible`
263265
).click();

0 commit comments

Comments
 (0)