From 91570ac1080d537746a8d4a20f5a5d4ef78cfa25 Mon Sep 17 00:00:00 2001 From: Denis Davidyuk Date: Mon, 20 Nov 2023 11:20:51 +0530 Subject: [PATCH] test: fix flaky onboarding e2e tests --- tests/e2e/specs/intro.cy.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/specs/intro.cy.js b/tests/e2e/specs/intro.cy.js index 0ac3bee83..023d79b34 100644 --- a/tests/e2e/specs/intro.cy.js +++ b/tests/e2e/specs/intro.cy.js @@ -70,13 +70,13 @@ describe('Onboarding', () => { openRoot(); cy.get('[data-cy="onboarding"]').click(); - cy.get('img').then(($el) => $el.get(0).complete).should('equal', true); + cy.get('img').should(($img) => expect($img[0].naturalWidth).to.be.greaterThan(0)); cy.matchImage(); cy.get('.ae-button[href="/"]'); for (let i = 0; i < 3; i += 1) { cy.get('[data-cy="next"]').click(); - cy.get('img').then(($el) => $el.get(0).complete).should('equal', true); + cy.get('img').should(($img) => expect($img[0].naturalWidth).to.be.greaterThan(0)); ensureAnimationOver(); cy.matchImage(); }