From b52638664acfd8723594fa6a0f85ed1c446fb454 Mon Sep 17 00:00:00 2001 From: Karine St-Onge Date: Wed, 11 Dec 2024 07:01:04 -0500 Subject: [PATCH] feat: CQDG-961 Adjust Cypress tests to fix some timing issues --- cypress/support/commands.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 4819c248..9cdd367f 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -350,7 +350,7 @@ Cypress.Commands.add('validateFilterInManager', (filterName: string, expect: str Cypress.Commands.add('validateIconStates', (iconName: string, isDisable: boolean, isDirty: boolean) => { const strShouldDisable = isDisable ? 'be.disabled' : 'not.be.disabled'; const strShouldDirty = isDirty ? 'have.class' : 'not.have.class'; - cy.get(`[id="query-builder-header-tools"] [data-icon="`+iconName+`"]`).parentsUntil('button').parent().should(strShouldDisable) + cy.get(`[id="query-builder-header-tools"] [data-icon="`+iconName+`"]`).parentsUntil('button').parent().should(strShouldDisable); cy.get(`[id="query-builder-header-tools"] [data-icon="`+iconName+`"]`).parentsUntil('button').parent().should(strShouldDirty, 'dirty'); }); @@ -436,13 +436,14 @@ Cypress.Commands.add('visitAndIntercept', (url: string, methodHTTP: string, rout Cypress.Commands.add('visitCommunityPage', () => { cy.visit('/community'); cy.waitWhileSpin(oneMinute); - cy.get('[data-cy="Title_Community"]') + cy.get('[data-cy="Title_Community"]'); }); Cypress.Commands.add('visitDashboard', () => { cy.visit('/dashboard'); cy.waitWhileSpin(oneMinute); - cy.get('[data-cy="Title_Dashboard"]') + cy.get('[data-cy="Title_Dashboard"]'); + cy.wait(2000); }); Cypress.Commands.add('visitDataExploration', (tab?: string, sharedFilterOption?: string) => {