mirror of https://github.com/apache/superset.git
fix(cypress): Fix failing/flaky E2E tests (#22460)
This commit is contained in:
parent
71982ee174
commit
21b56b2d49
|
@ -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');
|
||||
});
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ function prepareDashboardFilters(
|
|||
}).then(res => {
|
||||
const { body } = res;
|
||||
const dashboardId = body.result.id;
|
||||
const allFilters: Record<string, any>[] = [];
|
||||
const allFilters: Record<string, unknown>[] = [];
|
||||
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');
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue