From f7a4488bf513ae0567834880825e0ba1e70de824 Mon Sep 17 00:00:00 2001 From: splincode Date: Fri, 18 Oct 2024 23:45:41 +0300 Subject: [PATCH] chore: wait font status --- projects/demo-cypress/src/support/component.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/projects/demo-cypress/src/support/component.ts b/projects/demo-cypress/src/support/component.ts index 13c0049205b7..5e7df870a659 100644 --- a/projects/demo-cypress/src/support/component.ts +++ b/projects/demo-cypress/src/support/component.ts @@ -21,9 +21,11 @@ export const stableMount: typeof mount = (component, config) => cy .get('body') .find('[data-cy-root]') - .then(async () => - mountResponse.fixture.whenStable().then(() => mountResponse), - ), + .then(async () => { + cy.document().its('fonts.status').should('equal', 'loaded'); + + return mountResponse.fixture.whenStable().then(() => mountResponse); + }), ); Cypress.Commands.add('mount', stableMount);