From 09e96aab7407df17e44488cda19a3cf167cbd4fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aliz=C3=A9=20Debray?= Date: Tue, 21 May 2024 16:26:41 +0200 Subject: [PATCH] Update commands.ts --- packages/documentation/cypress/support/commands.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/documentation/cypress/support/commands.ts b/packages/documentation/cypress/support/commands.ts index 098c48ad6f..760e44a5c2 100644 --- a/packages/documentation/cypress/support/commands.ts +++ b/packages/documentation/cypress/support/commands.ts @@ -57,12 +57,16 @@ Cypress.Commands.add('waitForIconInElement', (selector: string) => { }); Cypress.Commands.add('waitForComponent', (name: string) => { - cy.get(`${name}.hydrated`, { timeout: 30000 }) - .shadow() - .get('post-icon.hydrated', { timeout: 30000 }) - .should('be.visible'); + cy.get(`${name}.hydrated`, { timeout: 30000 }).should('be.visible'); }); Cypress.Commands.add('waitForIconInComponent', (name: string) => { cy.get(`${name}.hydrated post-icon.hydrated`, { timeout: 30000 }).should('be.visible'); }); + +Cypress.Commands.add('waitForIconInComponentShadow', (name: string) => { + cy.get(`${name}.hydrated`, { timeout: 30000 }) + .shadow() + .get('post-icon.hydrated', { timeout: 30000 }) + .should('be.visible'); +});