Skip to content

Commit

Permalink
Update commands.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
alizedebray committed May 21, 2024
1 parent 53a8c95 commit 09e96aa
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions packages/documentation/cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});

0 comments on commit 09e96aa

Please sign in to comment.