diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/drilltodetail.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/drilltodetail.test.ts index c71a5833dba9..91485ce19bcf 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/drilltodetail.test.ts +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/drilltodetail.test.ts @@ -172,13 +172,13 @@ describe('Drill to detail modal', () => { openModalFromMenu('big_number_total'); // checking the data cy.getBySel('row-count-label').should('contain', '75.7k rows'); - cy.get('.virtual-table-cell').then($rows => { + cy.get('.virtual-table-cell').should($rows => { expect($rows).to.contain('Amy'); }); // checking the paginated data cy.get('.ant-pagination-item') .should('have.length', 6) - .then($pages => { + .should($pages => { expect($pages).to.contain('1'); expect($pages).to.contain('1514'); }); @@ -186,7 +186,7 @@ describe('Drill to detail modal', () => { // skips error on pagination cy.on('uncaught:exception', () => false); cy.wait('@samples'); - cy.get('.virtual-table-cell').then($rows => { + cy.get('.virtual-table-cell').should($rows => { expect($rows).to.contain('Kelly'); }); diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts index eb38aca4e8d0..365a7e4ecbaa 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/nativeFilters.test.ts @@ -82,7 +82,7 @@ function prepareDashboardFilters( }).then(res => { const { body } = res; const dashboardId = body.result.id; - const allFilters: Record[] = []; + const allFilters: Record[] = []; filters.forEach((f, i) => { allFilters.push({ id: `NATIVE_FILTER-fLH0pxFQ${i}`, @@ -202,6 +202,7 @@ function openVerticalFilterBar() { function setFilterBarOrientation(orientation: 'vertical' | 'horizontal') { cy.getBySel('filterbar-orientation-icon').click(); + cy.wait(250); cy.getBySel('dropdown-selectable-info') .contains('Orientation of filter bar') .should('exist'); diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/utils.ts b/superset-frontend/cypress-base/cypress/integration/dashboard/utils.ts index 89d3be8b9ef4..dbe8debc36f4 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/utils.ts +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/utils.ts @@ -306,8 +306,7 @@ export function getNativeFilterPlaceholderWithIndex(index: number) { export function applyNativeFilterValueWithIndex(index: number, value: string) { cy.get(nativeFilters.filterFromDashboardView.filterValueInput) .eq(index) - .parent() - .should('be.visible', { timeout: 10000 }) + .should('exist', { timeout: 10000 }) .type(`${value}{enter}`); // click the title to dismiss shown options cy.get(nativeFilters.filterFromDashboardView.filterName) diff --git a/superset-frontend/cypress-base/cypress/integration/explore/utils.ts b/superset-frontend/cypress-base/cypress/integration/explore/utils.ts index 3eac4f97be09..15e7dcba1b6f 100644 --- a/superset-frontend/cypress-base/cypress/integration/explore/utils.ts +++ b/superset-frontend/cypress-base/cypress/integration/explore/utils.ts @@ -82,6 +82,7 @@ export function saveChartToDashboard(dashboardName: string) { cy.wait('@update'); cy.wait('@get'); cy.wait('@getExplore'); + cy.contains(`was added to dashboard [${dashboardName}]`); } export function visitSampleChartFromList(chartName: string) {