Skip to content

Commit

Permalink
feat: CQDG-961 Adjust Cypress tests to fix some timing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Karine St-Onge committed Dec 11, 2024
1 parent ad87c39 commit b526386
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});

Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit b526386

Please sign in to comment.