From c5d605f04241577bc43b9b2280c08aace2a0615f Mon Sep 17 00:00:00 2001 From: Oluwatobi Bamidele Date: Tue, 24 Sep 2024 00:08:52 +0100 Subject: [PATCH] fix: wait for about and stats before trying to load the graph --- cypress/support/commands.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 1613e3146..d6d311cac 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -62,6 +62,9 @@ Cypress.Commands.add('initialSetup', (username, budget) => { }, }) + cy.wait(['@loadAbout', '@loadStats']) + cy.get('[data-testid="explore-graph-btn"]', { timeout: 30000 }).should('be.visible').click() - cy.wait(['@loadAbout', '@loadStats', '@getTrends', '@loadLatest']) + + cy.wait(['@getTrends', '@loadLatest']) })