From 27a746bf57a4483208c4a2ad69b8c7506554f524 Mon Sep 17 00:00:00 2001 From: Jack Fishwick Date: Wed, 28 Sep 2022 11:31:39 +0100 Subject: [PATCH] tests: fix minimap test. --- examples/vite-app/cypress/e2e/minimap.cy.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/examples/vite-app/cypress/e2e/minimap.cy.ts b/examples/vite-app/cypress/e2e/minimap.cy.ts index e6f4e3eb..bda3639a 100644 --- a/examples/vite-app/cypress/e2e/minimap.cy.ts +++ b/examples/vite-app/cypress/e2e/minimap.cy.ts @@ -9,13 +9,12 @@ describe('Minimap Testing', () => { }); it('has same number of nodes as the pane', () => { - const paneNodes = Cypress.$('.react-flow__node').length; + cy.get('.react-flow__minimap-node').then(() => { + const paneNodes = Cypress.$('.react-flow__node').length; + const minimapNodes = Cypress.$('.react-flow__minimap-node').length; - cy.wait(200); - - const minimapNodes = Cypress.$('.react-flow__minimap-node').length; - - expect(paneNodes).equal(minimapNodes); + expect(paneNodes).equal(minimapNodes); + }); }); it('changes zoom level', () => {